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/tokenBody#
| parameter | value |
|---|---|
client_id | which we passed to you |
client_secret | which we passed to you |
grant_type | refresh_token |
refresh_token | refresh 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.