OAuth2

POST/oauth/token

Retrieves an OAuth2 access token to be used with all API calls. Tokens are valid for 1 hour from the time of issue, so there is no need to request a unique token for each API call.

Request

Request Headers

Header Value
Content-Type application/json
Accept application/json
Authorization Basic (using API username and API key for username:password)

Request Parameters

Field Description Required
grant_type Currently only the "client_credentials" grant type is supported. Yes

Example Request Body

{
    "grant_type": "client_credentials"
}

Response

Response Status Codes

Code Description
200 OK
400/401 Unauthorized
403 Forbidden
500 Internal Server Error

Example Successful Response

{
    "access_token": "5685c7cacc1bac171d8da2e4839a142de2470c56",
    "expires_in": 3600,
    "token_type": "Bearer",
    "scope": null
}

Example Error Response

{
    "error": "invalid_client",
    "error_description": "The client credentials are invalid"
}