> ## Documentation Index
> Fetch the complete documentation index at: https://docs.go.gbgplc.com/llms.txt
> Use this file to discover all available pages before exploring further.

# IDscan and ID3 Global migration guide

> See how the tasks you do in IDscan and ID3 Global map to GBG Go, from getting an access token to sending a journey link and collecting results.

If you use IDscan or ID3 Global today, then this guide shows how each task you do now works in GBG Go. It puts the old and new requests side by side, so you can see what to change in your integration.

## How GBG Go differs

In IDscan and ID3 Global, you connect to each product separately. In GBG Go, document checks, selfie checks, data checks and screening run as steps in one journey. You build and manage that journey in the GBG Go platform.

This changes your integration in three ways:

* **One token**: A single access token covers every check in the journey.
* **One integration**: You start a journey, send your customer the link it returns, and collect the results. You don't call each product separately.
* **Your code stays the same when your checks change**: A business user adds, removes or reorders checks in the Journey builder.

## Quick reference

The following table maps each task to the request you use in GBG Go:

| Task | IDscan or ID3 Global | GBG Go |
| - | - | - |
| Get an access token | `idscanenterprisesvc/token` for IDscan, and a separate sign-in for ID3 Global | [Generate access token](https://docs.go.gbgplc.com/docs/go-v2/api-reference/endpoint/generate-access-token.md). One token covers all GBG Go requests. |
| Send your customer a link or QR code | `getQRCodeViaTokenSession` | [Start journey](https://docs.go.gbgplc.com/docs/go-v2/api-reference/endpoint/start-journey.md) with `delivery` set to `page`, then share the `instanceUrl` it returns. |
| Check progress and get results | A separate call for each product | [Fetch journey state](https://docs.go.gbgplc.com/docs/go-v2/api-reference/endpoint/fetch-journey-state.md), or receive a [notification](https://docs.go.gbgplc.com/docs/go-v2/platform/settings/notification-settings.md) when the journey completes. |

## Before you begin

Ensure you have the following:

* An API client ID and client secret. You create these yourself in the Account management portal. See [Manage API clients](https://docs.go.gbgplc.com/docs/go-v2/platform/account-management/manage-api-clients.md).
* A published hosted journey and its resource ID. A business user builds and publishes the journey in the Journey builder.
* The GBG Go region your organisation uses.

## Get an access token

IDscan and GBG Go both give you a token to send with each request. GBG Go uses a different endpoint, and you authenticate with API client credentials instead of a username and password.

### In IDscan

You sent your username and password to the `idscanenterprisesvc/token` endpoint:

```bash cURL theme={null}
curl --request POST \
  --url https://your-idscan-url/idscanenterprisesvc/token \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data-urlencode 'username=your-username' \
  --data-urlencode 'password=your-password' \
  --data-urlencode 'grant_type=password' \
  --data-urlencode 'area=scanning'
```

The response returned a token that lasted up to 10 hours:

```json JSON theme={null}
{
  "access_token": "your-access-token",
  "token_type": "bearer",
  "expires_in": 35999
}
```

> [!NOTE]
>
> If you moved to the newer IDscan sign-in, then you sent an access token in the request header instead of your username and password. The GBG Go steps are the same either way.

### In GBG Go

You send your client ID and client secret to the GBG Go token endpoint:

```bash cURL theme={null}
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'
```

The response returns an access token:

```json JSON theme={null}
{
  "access_token": "your-access-token",
  "token_type": "Bearer",
  "expires_in": 3600
}
```

Add the token to the `Authorization` header of every GBG Go request:

```text HTTP theme={null}
Authorization: Bearer your-access-token
```

Keep these points in mind:

* GBG Go tokens expire sooner than IDscan tokens. The `expires_in` value is in seconds, so request a new token before the current one expires.
* One token covers the whole journey. You don't need separate tokens for document checks and data checks.

For the full request and response, see [Generate access token](https://docs.go.gbgplc.com/docs/go-v2/api-reference/endpoint/generate-access-token.md).

## Send your customer a link

Both products host the screens your customer completes. In GBG Go, you start a journey instead of creating a session, and you get back a link instead of a QR code image.

### In IDscan

You called `getQRCodeViaTokenSession` to create a hosted session. Your IDscan token and session settings went in the query string:

```text HTTP theme={null}
POST https://your-idscan-qr-url/APIHandler/getQRCodeViaTokenSession/?journeyDef=your-journey&token=your-token&env=your-env&custNo=your-customer-number&lang=en&method=your-method
```

The request body carried your branding and session options:

* Your logo, as Base64
* Your organisation name
* Custom text to show your customer
* The redirect URL to send your customer to when they finish
* A file upload toggle
* Your own journey reference

The response returned a QR code image as Base64 and a link. Your customer scanned the code or opened the link to complete their checks.

### In GBG Go

You start a journey with `context.config.delivery` set to `page`. GBG Go then shows the screens, captures your customer's documents and selfie, and runs the checks.

Send the request to the base URL for your region:

| Region | Base URL |
| - | - |
| Europe | `https://eu.platform.go.gbgplc.com/v2/captain` |
| Americas | `https://us.platform.go.gbgplc.com/v2/captain` |
| Australasia | `https://au.platform.go.gbgplc.com/v2/captain` |

Each region covers a wider area than the code in its URL suggests. For example, organisations in the United Kingdom use the Europe (`eu`) endpoint.

> [!TIP]
>
> If you're not sure which region your organisation is set up in, [contact us](https://www.gbg.com/en/contact/customer-support/).

You can also send details you already know about your customer, such as their name, so they don't have to enter them again:

```bash cURL theme={null}
curl --request POST \
  --url https://eu.platform.go.gbgplc.com/v2/captain/journey/start \
  --header 'Authorization: Bearer your-access-token' \
  --header 'Content-Type: application/json' \
  --data '{
    "resourceId": "your-journey-resource-id@latest",
    "context": {
      "config": {
        "delivery": "page"
      },
      "subject": {
        "identity": {
          "firstName": "Jane",
          "lastNames": ["Doe"]
        }
      }
    }
  }'
```

The request contains the following fields:

| Field | Required | Description |
| - | - | - |
| `resourceId` | Yes | The journey to start. Add `@latest` to start the most recently published version. |
| `context.config.delivery` | Yes | Set to `page` to get a link to GBG-hosted screens. |
| `context.subject` | No | Details you already know about your customer. |

If the request is successful, then the API returns a `201 Created` response:

```json JSON theme={null}
{
  "instanceId": "PiIuACmx8Q8R7qPnAkLAqBAT",
  "instanceUrl": "https://eu.platform.go.gbgplc.com/apps/xK9mQ2pL7wN4vR8t",
  "status": "started",
  "message": "Journey PiIuACmx8Q8R7qPnAkLAqBAT started successfully"
}
```

The response contains the following fields:

| Field | Description |
| - | - |
| `instanceId` | Your reference for this journey. Save it, because you need it to get the results. |
| `instanceUrl` | The link to send your customer. |
| `status` | Returns `started` when GBG Go creates the journey. |
| `message` | A confirmation message. |

Redirect your customer to the `instanceUrl`, or send it by email, text message or a button in your app. GBG Go returns a link, not a QR code image. To show a QR code, generate one from the `instanceUrl`.

> [!NOTE]
>
> The `instanceUrl` is valid for a limited time. To set how long, see [Link settings](https://docs.go.gbgplc.com/docs/go-v2/platform/link-settings.md).

The branding and reference you sent in each IDscan request now live in other places:

* **Logo and colours**: Create a journey theme and apply it to the journey. See [Branding](https://docs.go.gbgplc.com/docs/go-v2/platform/branding.md).
* **Your own journey reference**: Send it as `uid` in `context.subject`. GBG Go stores it with the journey so that you can match the journey to your own records.

For the full request and response, see [Start journey](https://docs.go.gbgplc.com/docs/go-v2/api-reference/endpoint/start-journey.md).

## Get the results

In IDscan and ID3 Global, you called each product to get its result. In GBG Go, you get the results of every check in the journey from one request.

### Receive a notification

Set up a notification setting in the GBG Go platform and connect it to your journey. When the journey completes, GBG Go sends a signed `POST` request to your endpoint with the `instanceId`. You then fetch the results with that `instanceId`, so you don't need to poll.

For how to set it up, see [Configure webhook notifications for journey completion](https://docs.go.gbgplc.com/docs/go-v2/platform/settings/notification-settings.md).

### Fetch the journey state

Send the `instanceId` to the journey state endpoint:

```bash cURL theme={null}
curl --request POST \
  --url https://eu.platform.go.gbgplc.com/v2/captain/journey/state/fetch \
  --header 'Authorization: Bearer your-access-token' \
  --header 'Content-Type: application/json' \
  --data '{
    "instanceId": "PiIuACmx8Q8R7qPnAkLAqBAT"
  }'
```

While your customer is still completing the journey, the response returns a `200 OK` with the status `InProgress`:

```json JSON theme={null}
{
  "instanceId": "PiIuACmx8Q8R7qPnAkLAqBAT",
  "status": "InProgress"
}
```

When the status is `Completed`, the response also contains the results of every check in the journey. For the full response, see [Fetch journey state](https://docs.go.gbgplc.com/docs/go-v2/api-reference/endpoint/fetch-journey-state.md).

A journey has one of the following statuses:

| Status | Description |
| - | - |
| `InProgress` | Your customer is still completing the journey. |
| `Completed` | The journey has finished and the results are ready. |
| `Failed` | The journey encountered an error and couldn't finish. |

If you poll for the results, then wait 10 seconds between requests. Stop when the status is `Completed` or `Failed`. For the recommended retry settings, see [Polling for completion](https://docs.go.gbgplc.com/docs/go-v2/developer-integration/execute-customer-journeys/fetch-journey-state-step.md#polling-for-completion).

## Run ID3 Global data checks

You don't connect to ID3 Global separately. The data checks you run in ID3 Global today run as modules in your GBG Go journey, such as [Data verification](https://docs.go.gbgplc.com/docs/go-v2/platform/modules/data/data-verification.md). They use the same access token as every other GBG Go request.

## Troubleshoot a request

If a request fails, then the response contains an `errors` array that explains the problem and how to fix it:

```json JSON theme={null}
{
  "errors": [
    {
      "code": "4002",
      "name": "MISSING_FIELD",
      "location": "Body",
      "problem": "Either resourceId or deliveryId is required",
      "action": "Please provide resourceId (e.g., 'my-delivery@latest') or deliveryId"
    }
  ]
}
```

Error responses include an `X-Request-ID` header. Quote this value when you contact GBG support about a request. For every error code, see [Error handling](https://docs.go.gbgplc.com/docs/go-v2/developer-integration/error-handling.md).

## Next steps

* Follow the [Hosted journey integration guide](https://docs.go.gbgplc.com/docs/go-v2/low-code-builder/execution-guides/overview.md) to build a complete hosted journey integration.
* Review the [API reference](https://docs.go.gbgplc.com/docs/go-v2/api-reference/overview.md) for every endpoint.
* Contact your GBG account manager for help to set up your first journey.
