Developers
qashio.com

Refresh access token

POST/oauth2/token

Rotate 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

FieldTypeDescription
grant_typestringAlways refresh_token. Required
client_idstringYour client identifier. Required
client_secretstringYour client secret. Required
refresh_tokenstringThe refresh token to rotate. Required
JSON
{
  "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.

FieldTypeDescription
access_tokenstringBearer token to send on API requests
token_typestringAlways Bearer
refresh_tokenstringUse this on the next refresh; the one you sent no longer works
scopestringSpace-separated scopes granted, e.g. cards:read cards:write transactions:read
Response schema from the OpenAPI document
FieldTypeDescription
access_tokenstring
token_typestring
refresh_tokenstring
scopestring

Errors

StatusCause
400Missing or unsupported parameters
401Invalid client credentials; refresh token invalid, expired, revoked or reused
  • 400Invalid grant / missing client credentials
  • 401Invalid 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.

This request takes no parameters.

Response

Send the request to see the response.

Esc

Start here

IntroductionIntegration walkthroughAuthenticationConventions

Popular endpoints

POSTExchange code for tokens/oauth2/tokenGETGet company summary/public/v1/erp/company/summaryGETList bank accounts/public/v1/erp/bank_accountsGETList cards/public/v1/erp/cardsGETList chart of accounts/public/v1/erp/chart_of_accounts