> For the complete documentation index, see [llms.txt](https://aliniex.gitbook.io/alix-pay/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://aliniex.gitbook.io/alix-pay/api-reference/alix-card-api/auth/refresh-token.md).

# Refresh Token

<mark style="color:orange;">`POST`</mark> /api/v2/auth/refresh-token

This API allows you to do the authenication with Alix Platform&#x20;

**Headers**

| Name         | Value              |
| ------------ | ------------------ |
| Content-Type | `application/json` |

Request Body

```json
{
  "partnerCode": "{{partner_code}}",
  "refreshToken": "{{refresh_token}}",
  "signature": "NvbOckSnBVXJiOqhY+9UIbDBGHCMuEOHsz9hR3M+3L/GU13nlrARhWVbLiF8/YacsACdzc7dtBkZTG0Yx/kps8anuBVjMr2CDqtCXBcip7sBxz+Lv+e4KH7oCXM0hbDt6vgA/GWdo9qtrHRgy7oOr4vedCQPHIe6t4YUXwl5WMrnpJpmrx+nrWYMfiM/d4V6qycq4z9D/URWjILtCYDqpjWEx0frYz9tt3zbCAtz6s5ShGFY8iQGx9YdektjYzy/cexxHSfVxyCFaQCq4QCi04kUl6Lbg5bptexnks3eG5VViXEkaiH4pm+L0u08NyQdClMBveLLFe46CxxIv4gm1A=="
}
```

<table><thead><tr><th width="164">Name</th><th width="82">Type</th><th width="110">Condition</th><th>Value</th></tr></thead><tbody><tr><td>partnerCode</td><td>string</td><td>required</td><td>The partner code sent via invitation email</td></tr><tr><td>userEmail</td><td>string</td><td>required</td><td>the email address of your end-user</td></tr><tr><td>signature</td><td>string</td><td>required</td><td><p></p><ul><li>Partner will digitally sign the transmitted data using <strong><code>SHA256</code></strong> with RSA algorithm</li><li>The <strong>public key</strong> that has been provided to you during onboarding.</li><li>Data shall be signed according to the structure <strong><code>partnerCode|secretKey</code></strong></li></ul></td></tr></tbody></table>

**Response**&#x20;

{% tabs %}
{% tab title="200" %}

```json

{
    "success": true,
    "message": "Your request has been successful",
    "data": {
        "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzaWduIjoicmpnUURlOFFWbG5QOUFKTCIsInBhcnRuZXJDb2RlIjoiemVuY2FyZHRlc3QiLCJpYXQiOjE3MzEzMTM5NzgsImV4cCI6MTczMTMxNDg3OH0.7iBLv8Ib6UHbxlrtfjnMzvhpkdYlldSkaXe6RRUI4eQ",
        "refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzaWduIjoicmpnUURlOFFWbG5QOUFKTCIsInBhcnRuZXJDb2RlIjoiemVuY2FyZHRlc3QiLCJzZXNzaW9uIjoiYjY5ODMwYTItYzk3ZS00NDg0LWE1YzctYTk1NWIwNGFkYzZkIiwiaWF0IjoxNzMxMzEzOTc4LCJleHAiOjE3NDY4NjU5Nzh9.EK7RpVPkTvhmt2bwkrqzVpIRWYGSwn7TFLHmVHPQo7Q",
        "accessTokenExpiresAt": "1731314878",
        "refreshTokenExpiresAt": "1746865978"
    },
    "errorCode": 0
}

```

{% endtab %}

{% tab title="400" %}

<pre class="language-json"><code class="lang-json">{
    "success": false,
    "message": "The QR code is invalid. Please check and try again",
    "data": null,
    "errorCode": 32
}
<strong>
</strong>
</code></pre>

{% endtab %}
{% endtabs %}

**Description of Response Data**&#x20;

<table><thead><tr><th width="264">Name</th><th width="100">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>accessToken</code></td><td>string</td><td>The access token</td></tr><tr><td>refreshToken</td><td>string</td><td>the refresh token</td></tr><tr><td><code>accessTokenExpiredAt</code></td><td>datetime</td><td></td></tr><tr><td><code>refreshTokenExpiredAt</code></td><td>datetime</td><td></td></tr></tbody></table>

{% hint style="warning" %}
**When the access token expried. Please use the refresh token to get new access token instead of get a new access token**&#x20;
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://aliniex.gitbook.io/alix-pay/api-reference/alix-card-api/auth/refresh-token.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
