Skip to main content
The Core SDK (@gbg/go-core) provides a type-safe TypeScript client for the GBG GO Captain API. Use it on your server to authenticate, start journeys, manage tasks, connect devices, and generate the tokens and URLs needed to embed web journeys in your apps.
The Core SDK is in beta. Pin to a specific version to avoid breaking changes between releases.

Installation

npm
pnpm
yarn
The package ships with both CommonJS and ES module builds, and includes TypeScript declarations. Supported runtimes: Node.js 18+, Bun 1+, Deno 1.39+, modern browsers.

Authentication

Generate an access token, then pass it to the SDK:
You can also set the GO_CUSTOMER_ACCESS environment variable instead of passing the token directly.

Region selection

GBG GO is deployed across three regions. Set your region when initializing the SDK:

Available operations

These are the resources and methods exposed by the SDK:

Start a journey

Pass the resource ID of the journey template you want to run. The response includes the instanceId you’ll use to track the journey:

Connect an end-user device

Generate a connect token on your server, then pass it to the end user’s device:

Error handling

Catch GoError to inspect the HTTP status code and response body when an API call fails:

Retries

Configure retry behaviour globally or per-request:

Further reading

For the complete API reference, standalone functions for tree-shaking, custom HTTP client configuration, and debugging options, see the full SDK documentation on GitHub: