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.
Header | Value |
---|---|
Content-Type | application/json |
Accept | application/json |
Authorization | Basic (using API username and API key for username:password) |
Field | Description | Required |
---|---|---|
grant_type | Currently only the "client_credentials" grant type is supported. | Yes |
{
"grant_type": "client_credentials"
}
Code | Description |
---|---|
200 | OK |
400/401 | Unauthorized |
403 | Forbidden |
500 | Internal Server Error |
{
"access_token": "5685c7cacc1bac171d8da2e4839a142de2470c56",
"expires_in": 3600,
"token_type": "Bearer",
"scope": null
}
{
"error": "invalid_client",
"error_description": "The client credentials are invalid"
}