refresh_token
When a user logs into a system, they are typically issued an access token (access_token
) that allows them to perform actions on the system's behalf. However, this token usually has a limited lifespan. Once it expires, the user must obtain a new token to continue using the system without re-entering their credentials. This can be done using a refresh_token
— a special token that allows you to request a new access_token
without re-authenticating the user.
Request Description
To refresh an access token, a request to the POST /reg/auth/token endpoint.
- Request URL:
POST /reg/auth/token
Request Body
The request body should contain a JSON object with the following parameters:
grant_type
: A string with the value"refresh_token"
. This parameter indicates that the operation being performed is a token refresh.refresh_token
: A string containing therefresh_token
that was issued during the initial authentication.
Example of the request body:
{
"grant_type": "refresh_token",
"refresh_token": "eyJraWQiOiJmODAyNjg0OC1mNTJkLTRmY"
}
Example Response:
{
"access_token": "eyJraWQiOiJmODAyNjg0OC1mNTJkLTRmY",
"token_type": "Bearer",
"refresh_token": "eyJraWQiOiJmFGGghrwghhnEGFGrehrnjdf7653kFZ_uusa3WYE",
"scope": "accounts:create accounts:read accounts:show cardholder_user:read cardholder_user:write counterparty:create counterparty:read deposit:read deposit_atm:create deposit_bank:create deposit_crypto:create exchange:create exchange:read exchange:show top_up_account:show top_up_atm_gcp_qr:show top_up_bank:show top_up_bank_card:show top_up_crypto:show transfer:read transfer_other:create transfer_own:create user_email:create user_email:write user_mfa:create user_mfa:read user_phone:create user_phone:write withdraw:read withdraw_account:show withdraw_atm:create withdraw_atm_gcp_qr:show withdraw_bank:create withdraw_bank:show withdraw_crypto:create withdraw_crypto:show withdraw_ips:show withdraw_other_account:show",
"expires_in": 86400,
"user_id": "usr:b06d9aaa-4310-4c0d-9e5343c1b35"
}
Updated 2 months ago