Skip to main content
This quickstart guides you through your first developer-first integration using the GBG Go Core SDK, in TypeScript or Java. You authenticate, start a journey, fetch the first interaction, submit data, and poll for the result.
If you’re unsure of the best way to integrate, then start with Get started with GBG Go.
This quickstart runs the same journey as the API-first integration quickstart, which makes each call with raw HTTP. Read the two side by side to see what the SDK does for you.

Before you start

Before running this quickstart, make sure you have:
  • An API client created in the Account management portal, which provides the client ID and client secret you use to authenticate. For instructions, see Manage API clients.
  • Permission to create and publish journeys in the Journey builder.
  • For TypeScript, Node.js 18 or later, and npm.
  • For Java, JDK 11 or later, and Maven.

Step 1: Set up your journey

You need a published journey with the Age Verification module. Follow the steps in Option 2: Create a journey from scratch of the Platform quickstart to add the module to a journey and publish it.
The program submits a name and a date of birth. Add only the Age Verification module, so that the journey doesn’t wait for anything else. A journey with more modules, for example document checks, stays in progress after the submit.
Once you’ve published your journey to Preview, copy the Resource ID and Version number from the Dashboard. You combine them as <resourceId>@<version>, for example:

Step 2: Create a project

Create a folder for the quickstart, then install the SDK and tsx, which runs TypeScript files directly:

Step 3: Set your credentials

The program reads your credentials and journey from environment variables. Set them in the terminal you’ll run it from:
Never commit your client secret, and never put it in front-end code. The SDK runs on your server, which is the only place your credentials belong.

Step 4: Write the program

Create a file named quickstart.ts in the project folder with this code:
quickstart.ts
The program makes five calls, in order:
Pass the access token as interactionAccess on every interaction call. These methods don’t use the client’s customerAccess token. Without it, the SDK sends the request without an Authorization header and GBG Go rejects it.
The fetch and state responses each arrive as one of three variants. Each is a full view, a slim view, or an unknown body, and the program checks which variant arrived before it reads any fields. If your tenant is in the Americas or Australasia, then replace eu in SERVER_URL with us or au.

Step 5: Run the program

Run the program from the project folder:
When the journey finishes, your output looks similar to this:
If the journey needs more data than a name and a date of birth, then the program ends with this line instead:
The journey instance appears in the Investigation portal, where you can see the module result and the data you submitted.

Troubleshooting

The client ID or client secret is wrong, or someone deleted the API client. Check the values in the Clients tab of the Account management portal, and set the environment variables again.
GBG Go can’t find the journey. Check that JOURNEY_RESOURCE_ID includes the version, that you’ve published the journey, and that SERVER_URL names the region your tenant is in.
The call is missing its security setting. In TypeScript, pass { interactionAccess: accessToken } as the first argument to interactions.fetch and interactions.submit. In Java, call .security() with interactionAccess(accessToken) on interactions().fetch() and interactions().submit().
The journey is waiting for data the program doesn’t send, such as an address or a photo of a document. Open the journey instance in the Investigation portal to see which step it’s waiting at.Remove the extra modules from the journey and publish it again, or extend the submit call to send the data they need.
The journey didn’t present an interaction within 20 seconds. Open the journey instance in the Investigation portal to see which step it stopped at.
Node.js uses its own list of trusted certificate authorities, not your operating system’s. Behind a TLS-inspecting proxy, every request fails even though curl works.On Node.js 22.15 or later, run export NODE_OPTIONS=--use-system-ca before you run the program. On older versions, set NODE_EXTRA_CA_CERTS to the path of your proxy’s root certificate.

Next steps

  • Core SDK: every resource and method the SDK exposes, with regions, retries, and error handling.
  • TypeScript notes and Java notes: install details, runtime support, and language-specific features.
  • Sample applications: working onboarding apps with a front end, on an API or SDK backend.
  • API usage guides: detailed step-by-step reference for each call.