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

# Environments and authentication

> Base URLs, credential types and how to keep them safe.

## Environments

| Environment | Base URL |
| - | - |
| Sandbox | `https://{environment}.sb.getid.dev` |
| Production | `https://{environment}.getid.ee` |

Replace `{environment}` with your environment name. API keys, SDK keys and webhook signature keys differ between sandbox and production.

## Credentials

| Credential | Where to find it | Header | Used for |
| - | - | - | - |
| **API key** | Backoffice → Settings → API Configuration → API Key | `X-API-Key` | API requests from your backend. Gives full access to the API and SDK API calls, including all submitted applications. |
| **API token** | Created with `POST /api/v1/token` | `X-API-Key` | API requests. A token without root access can only access applications associated with that token. |
| **SDK key** | Backoffice → Settings → SDK Configuration | `X-SDK-Key` | Creating SDK session tokens on your backend |
| **SDK session token (JWT)** | Created with `POST /sdk/v2/token` | `jwt` in the Web SDK config | Starting one SDK verification session |
| **Webhook signature key** | Backoffice → Settings → Webhooks → Signature key | n/a | Verifying webhook signatures |

API tokens have a default lifetime of 86400 seconds (24 hours), set with `ttl`.

Set `accessLevel: "root"` for a token without application access restrictions.

The response contains the token:

```json theme={null}
{ "responseCode": 200, "token": "..." }
```

The API key gives full access to the API and SDK methods. Keep it on your server and never share it.

## Restrict API access by IP

You can allow API requests only from known IP addresses. In the Backoffice, go to **Settings → API Configuration → Whitelist for API requests** and add each address with a description. Both single IPs (for example `255.255.9.9`) and ranges in CIDR notation (for example `127.0.0.1/24`) are accepted.

Once addresses are listed, API requests are accepted only from those IPs. Keep separate lists for sandbox and production.

## Create an SDK session token

Your backend creates a session token once per verification session. The SDK key must never be exposed client-side.

```bash cURL theme={null}
curl --request POST "https://${CHECKIN_ENV}.sb.getid.dev/sdk/v2/token" \
  --header "X-SDK-Key: ${CHECKIN_SDK_KEY}" \
  --header "Content-Type: application/json"
```

```javascript Node.js theme={null}
const res = await fetch(`https://${process.env.CHECKIN_ENV}.sb.getid.dev/sdk/v2/token`, {
  method: 'POST',
  headers: {
    'X-SDK-Key': process.env.CHECKIN_SDK_KEY,
    'Content-Type': 'application/json',
  },
});
const { token } = await res.json();
```

The response contains the token:

```json theme={null}
{ "responseCode": 200, "token": "eyJhbGciOiJIUzI1NiIsInR5..." }
```

Read `token` from the response and pass it to the SDK. Each session token can be used once and is valid for 24 hours.

During integration, the SDKs can use the SDK key directly instead of a session token. Don't do this in production.

## Authentication errors

A missing or wrong key returns `401` with

```json theme={null}
{ 
"responseCode": 401, 
"errorMessage": "Unauthorized" 
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.