# Refresh token

## /oauth2/token

<mark style="color:green;">`POST`</mark> `https://oauth-qc.vinid.dev/oauth2/token`

#### Request Body

| Name           | Type   | Description                  |
| -------------- | ------ | ---------------------------- |
| redirect\_uri  | string |                              |
| client\_secret | string | Không cần đối với luồng PKCE |
| client\_id     | string |                              |
| refresh\_token | string |                              |
| grant\_type    | string |                              |

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

```
{
    "access_token": "string",
    "expires_in": 3600,
    "id_token": "string",
    "refresh_token": "string",
    "scope": "openid offline some_scope",
    "token_type": "bearer"
}
```

{% endtab %}
{% endtabs %}

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

```
curl --location --request POST 'https://oauth2-dev.vinid.dev/oauth2/token' \
--form 'grant_type=refresh_token' \
--form 'refresh_token={refresh_token}' \
--form 'client_id={client_id}' \
--form 'redirect_uri=https://your-home-page'
```

{% endtab %}
{% endtabs %}

> Thời gian hết hạn của refresh\_token mặc định là 720 giờ


---

# Agent Instructions: 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://developers.vinid.net/tai-lieu-tich-hop/tich-hop-vinid-sso/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.
