Overview
This quick start guides you through the following:- Set up authentication.
- Execute your first customer journey.
Before you start
Before running this quickstart, complete the following prerequisites:- Your GBG account manager has provided your API credentials. These credentials are required to authenticate your API requests. They include:
client_id: Your unique API client identifier.client_secret: Your secret key for API authentication.username: Your API username.password: Your API password.grant_type: Type in password (this is fixed and does not change).
API credentials are different from your personal GBG GO platform login. API credentials are specifically for programmatic access and should not be confused with the username/password you use to log into the GBG GO dashboard.
- A business user must have created and published a customer journey to Preview or Production.
- You have the published journey’s resource ID and version. This is found in the journey dashboard.
- Your password has been reset from the temporary one (required before API authentication). Ask your account manager for help with password reset.
- You have a development environment capable of making HTTP requests, for example, Postman.
Step 1: Request an access token for authentication
Make a POST request to obtain your Bearer token:cURL
JSON
Store the
access_token value securely. Do not share them in emails, chat messages, client-side code or publicly accessible sites.If you run into a credentials error when making a token cURL request, it’s most likely your credentials aren’t correct. Contact your account manager for the correct or updated credentials.
Step 2: Execute your first customer journey
There are two ways to execute your first journey:Execute journey in non-prefill mode
Use your provided access token, journey resource ID and version to start a journey. Make a cURL POST request to the(/journey/start) endpoint like this:
cURL
instanceId that represents your active journey. The instance ID looks like this:
JSON
Get the journey resource ID and version from your GBG GO dashboard or business designer after a journey is published.
Replace
@latest with your specific journey version. For example: "resourceId": "8c24f3a5b76d09e182c397fd45c91ae3f8b530d7a19e64c2bd93f5a76c48e09f@3x5wz848".You should note that using @latest may cause a small delay in processing.Execute journey in pre-fill mode (optional)
If you have customer data available, include it in the context object:cURL
instanceId that represents your active journey. The instance ID looks like this:
JSON
Context user data is obtained from the user schema generated after a journey is published.
Execute journey in async pre-fill mode (optional)
To start a journey in asynchronous mode, include "async": true in the config object within your request context, as shown below:
cURL