Obtain access token
Authentication
Obtain access token
POST /oauth2/token — OAuth 2.0 client credentials
POST
Obtain access token
Endpoint
/oauth2/tokenContent-Type:
application/x-www-form-urlencoded
This endpoint does not return a refresh token. When
expires_in elapses, call this endpoint again with the same client credentials.Request body
All parameters are sent as form fields (application/x-www-form-urlencoded). client_id and client_secret are required.
| Parameter | Required | Description |
|---|---|---|
grant_type | Yes | Must be client_credentials |
client_id | Yes | Your API client id |
client_secret | Yes | Your API client secret |
Example
Alternative: HTTP Basic
You may also send credentials in theAuthorization header instead of the form body:
grant_type=client_credentials.
Response
200 — Token issuedaccess_token on subsequent requests:
Errors
| Status | When |
|---|---|
400 | Missing or invalid grant_type |
401 | Invalid client_id or client_secret |
error, error_description).
Next step
After obtaining a token, see API introduction for object routes and response format.Body
application/x-www-form-urlencoded
Requires grant_type, client_id, and client_secret as application/x-www-form-urlencoded fields.
