Skip to main content
Before you can use the GBG GO API, you must authenticate your request. Exchange your API client credentials for an access token, then include it in every API call.

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 during API client creation.
You create API clients in the Account management portal. See Manage API clients for instructions.

Request an access token

To get your access token, send a POST request to the token endpoint using the client_credentials grant type. You can send a request like this:
BASH
curl --request POST \
  --url https://api.auth.gbgplc.com/as/token.oauth2 \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data 'grant_type=client_credentials' \
  --data 'client_id=your-client-id' \
  --data 'client_secret=your-client-secret' \
  --data 'scope=gbg.token'
If your request is successful, then the API returns a response in this format:
JSON
{
  "access_token": "your-access-token",
  "token_type": "Bearer",
  "expires_in": 3600
}
Store your access token securely and refresh it when it expires. Refer to the Generate access token API reference for details on the request and response definitions.

Next step

Go to Start a journey to learn how to trigger a customer journey using your access token.