What you need
Before requesting an access token, make sure you have created an API client and have the following credentials:- Client ID: Identifies your API client.
- Client secret: A secure key generated when you create the API client.
You create API clients in the Clients tab of the Account management portal. See Manage API clients for instructions.
Request an access token
To get your access token, send aPOST request to the token endpoint using the client_credentials grant type.
You can send a request like this:
BASH
JSON
FAQ
What is the authentication URL and how do I get a token?
What is the authentication URL and how do I get a token?
To authenticate, send a The request must be sent with the following parameters:
Example request:A successful response returns:Include the token in the
POST request to the token endpoint:JSON
| Parameter | Description |
|---|---|
grant_type | Set to client_credentials. |
client_id | The client ID. |
client_secret | The client secret. |
scope | Set to gbg.token. |
BASH
Authorization header of subsequent API request as Bearer your-access-token. Store the token securely and refresh it before it expires.You create API clients yourself in the Clients tab of the Account management portal, where you generate the client ID and client secret used to authenticate. For details, see Manage API clients in Account management.