Token Refresh
This method is used to refresh a pair of tokens when the access token has expired.
Request Parameters
POST /api/clients/v1/auth/refresh/
Headers
- Content-Type: application/json
- Authorization: Bearer
$access_token
JSON body
| Parameter | Type | Constraints | Description | Example |
|---|---|---|---|---|
| refresh | string | Required | Refresh token | eyJ0eX...15Fk |
Response Parameters
JSON body
| Parameter | Type | Description |
|---|---|---|
| access | string | Access token |
| refresh | string | Refresh token |
Examples
200 OK
JWT token pair
{
"refresh": "eyJ0eXAiOiJKV1QiLJhCbGOiciJIUz1NIiJ9.eyJ0b2tlbl90eXBlIjoicmVmcaCmVzIsV4ImcCI6MTcxNTQxzMNzkSwianRpIjoiQ0ZGJZGlZDc3NzMwNDQ1ZjliM2Y4ZTc2MTA5YjFhMWQiLCJ1c2VyX2lkIjo0fQ.VBKIBnhYHgGxGRQvXwM2X2TY1_FVXBW0aZiGeO215Fk",
"access": "eyJ0eXAiOiJKV1QiLJhCbGOiciJIUz1NIiJ9.eyJ0b2tlbl90eXBlIjoiYWNjZIiXNzwihwZXIjoxNzEzNjg5xLOTMCJqdGkiOiI1Q3Y2JMmjYWEwOTI0NDMyOTJhZDM2NGVlOTE5NjRjOSIsInVzZXJfaWQiOjR9.7SOVohFO8utkBjPuePvoAqTk1eLwO5Fdn26UjqWip_8"
}
401 Unauthorized
Authentication credentials are missing or invalid
{
"detail": "Given token not valid for any token type",
"code": "token_not_valid",
"messages": [
{
"token_class": "RefreshToken",
"token_type": "refresh",
"message": "Token is invalid or expired"
}
]
}