Skip to main content

4. Refresh your access token

When your access token has expired (you receive 401 errors) or its expiration time is very close you should refresh it using the method below.

POST /oauth/token#

info

As opposed to other API endpoints, the /oauth ones are not in the /api/v2 namespace, but on the /backend level directly. So please use this as your full url:

https://[env].convela.cloud/backend/oauth/token

Body#

parametervalue
client_idwhich we passed to you
client_secretwhich we passed to you
grant_typerefresh_token
refresh_tokenrefresh token, which you received when you were granted the respective access token

Response#

{  "token_type": "Bearer",  "expires_in": 2591999,  "access_token": "eyJ0eXAmpcflwfUY6h7...rSJ7KnfGDTCciu4ASE",  "refresh_token": "def502001bab181ef9...b5c7cfvd27f66ce754e"}
info

The refresh token you used to get a new set of tokens will be revoked. Use your new refresh token once you need to get a new access token.