@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
Authentication
Generate an access token, then pass it to the SDK: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:- EU
- US
- AU
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 theinstanceId 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
CatchGoError to inspect the HTTP status code and response body when an API call fails: