POST
Get an Access Token by using an authorized Secret Key. The API returns the Access Token along with its expiry and a Refresh Token. To obtain a renewed Access Token after expiry, make the same call with the Refresh Token.
  • URL: /auth/v2/accessToken
  • Full URL: <base_url>/auth/v2/accessToken
  • Request Method: POST

Request Body

Send the fields as form data (application/x-www-form-urlencoded).
string
required
How the Access Token is granted. One of secret or refresh.
string
Secret Key from the Partner Console. Required when grantType is secret.
string
Refresh Token returned by a previous call to this endpoint. Required when grantType is refresh.
Keep your Secret Key server-side. Never use it in client code or commit it to source control.

Sample Request

Response

object
object

Sample Response

Success

Status Codes

Error codes

Returned in header.response_code when the request fails. See Errors for the response envelope and the full list of codes.

Using the token

Send the Access Token in the X-AccessToken header on every other call: Send the Access Token in the X-AccessToken request header on every authenticated call:
When the token expires, request a new one with grantType=refresh instead of sending your Secret Key again.