Authorization

Obtaining access_token and refresh_token tokens.

This method allows you to get <code>access_token</code> and <code>refresh_token</code> through two scenarios:<br> <ul> <li> exchanging <code>authorization_code</code> for tokens</li> <li> exchange of <code>refresh_token</code> for tokens (token refresh operation)</li> </ul>

post/rest/auth/token/

Request body

grantType'authorization_code' | 'refresh_token' required

Authorization grant type

tokenstring required

Authorization code when grant type is <code>authorization_code</code> or Refresh token when grant type is <code>refresh_token</code>

developerIdstring nullable

Developer UUID (optional)

Example request

{
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJleGFtcGxlLmVycGJveC5wbCIsImV4cCI6MTYxNTg5NzYxOSwianRpIjoiOTc2YjYxYmItNWRkMC01MjIxLWExY2MtNzNiY2Q0MzVhNGMyIiwidHlwZSI6InJlZnJlc2hfdG9rZW4iLCJjbGllbnRfaWQiOjIsInBsYXRmb3JtX2lkIjoxLCJpYXQiOjE2MDc5NTMyMTl9.XH8X9cA0eb0RNlQJn8_jIQFDFVmKnOCDO0YWVvaM5B8",
  "developerId": "abc8c088-f9e0-42a8-b2e7-3fa0e90aa1be"
}

Response

Credentials

accessTokenstring

Access token

accessTokenExpireAtstring date-time

Access token expire date

refreshTokenstring

Refresh token

refreshTokenExpireAtstring date-time

Refresh token expire date

Example response

{
  "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJleGFtcGxlLmVycGJveC5wbCIsImV4cCI6MTYwOTc2NzYxOSwianRpIjoiZTg0Yjg3MWItMjg1NS01NzVkLWJlYzMtNzdhMjcwOTdlOTYyIiwidHlwZSI6ImFjY2Vzc190b2tlbiIsImNsaWVudF9pZCI6MiwicGxhdGZvcm1faWQiOjEsImlhdCI6MTYwNzk1MzIxOX0.iQJ78Xqd7exf7M6l26iWS-Nor0AjxJKwsyHPwOFpJ-s",
  "accessTokenExpireAt": "2021-01-04T14:40:19Z",
  "refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJleGFtcGxlLmVycGJveC5wbCIsImV4cCI6MTYxNTg5NzYxOSwianRpIjoiOTc2YjYxYmItNWRkMC01MjIxLWExY2MtNzNiY2Q0MzVhNGMyIiwidHlwZSI6InJlZnJlc2hfdG9rZW4iLCJjbGllbnRfaWQiOjIsInBsYXRmb3JtX2lkIjoxLCJpYXQiOjE2MDc5NTMyMTl9.XH8X9cA0eb0RNlQJn8_jIQFDFVmKnOCDO0YWVvaM5B8",
  "refreshTokenExpireAt": "2021-03-16T13:26:59Z"
}

Changes