The POST v{#}/oauth2/token
allows you to retrieve a token to access other V0 APIs.
...
For example, the following string represents an account with the account key "a1b2c3d4e5" and the API authentication token "9pBl+xY1MW+AbsdZk4xpv7NwWxG8+oqduKiSqVybM9Y=":
a1b2c3d4e5:9pBl+xY1MW+AbsdZk4xpv7NwWxG8+oqduKiSqVybM9Y=
Note the colon delimiter.
This string is then Base64 encoded:
YTFiMmMzZDRlNTo5cEJsK3hZMU1XK0Fic2RaazR4cHY3TndXeEc4K29xZHVLaVNxVnliTTlZPQ==
The encoded value is then appended to the Basic keyword passed in the Authorization header:
...
Note |
---|
client_id and client_secret are required if the basic authorization header is not used. |
grant_type
Type | Required | Example |
---|---|---|
String | True | client_credentials |
The value of grant_type is always 'client_credentials' indicating that this request for authorization is being made using the OAuth2 client credential grant type. For more information on client-credentials grant type, see http://tools.ietf.org/html/draft-ietf-oauth-v2-31#section-4.4.
client_id
Type | Required | Example |
---|---|---|
String | False | lmccg0ujju2 |
The account key identifier.
client_secret
Type | Required | Example |
---|---|---|
String | False | KnS5GfKULFLp2oTouY0Y2MLEWQi4wERm451sYBTQ= |
Alphanumeric string that contains the private API authentication token issued to you.
...
Note | ||||||||
---|---|---|---|---|---|---|---|---|
The examples use *** as a placeholder for the regional subdomain. To access the API for your region, replace *** with the correct subdomain for your region:
|
...