Refresh access token
/oauth2/tokenRotate an expiring access token for a new token pair.
The token endpoint, called with grant_type=refresh_token. Send the refresh token
from your last token response and Qashio returns a new access token and a new refresh token. Refresh
before the access token expires, or on the first 401 from an API call.
Your client_id and client_secret are required. These are confidential client credentials and
must never be used from a browser or mobile app.
Refresh tokens are single use. Each refresh returns a new refresh token and invalidates the one you sent. If a refresh token is presented twice, Qashio treats it as a possible theft and revokes the whole token family, which signs the integration out: store the newest refresh token after every call.
This endpoint does not use the standard response envelope.
Request body
application/jsonrequired
| Field | Type | Description |
|---|---|---|
grant_type | string | Always refresh_token. Required |
client_id | string | Your client identifier. Required |
client_secret | string | Your client secret. Required |
refresh_token | string | The refresh token to rotate. Required |
{
"grant_type": "refresh_token",
"refresh_token": "rt_8f3a1c9e2b7d4a6c...",
"client_id": "YOUR_CLIENT_ID",
"client_secret": "YOUR_CLIENT_SECRET"
}Response
200 with the new token set.
| Field | Type | Description |
|---|---|---|
access_token | string | Bearer token to send on API requests |
token_type | string | Always Bearer |
refresh_token | string | Use this on the next refresh; the one you sent no longer works |
scope | string | Space-separated scopes granted, e.g. cards:read cards:write transactions:read |
Response schema from the OpenAPI document
| Field | Type | Description |
|---|---|---|
access_token | string | |
token_type | string | |
refresh_token | string | |
scope | string |
Errors
| Status | Cause |
|---|---|
400 | Missing or unsupported parameters |
401 | Invalid client credentials; refresh token invalid, expired, revoked or reused |
400Invalid grant / missing client credentials401Invalid client, or refresh token invalid, expired, revoked or reused
Every error carries an errors[] array and a meta.request_id. See Errors for the full envelope.