# Get a Direct token for your host

Authenticates a customer host using API key and secret credentials, returning a JWT access token and a refresh token. The access token must be included as a Bearer token in the `Authorization` header for all `/direct/*` endpoints.
**Requirements:** The host must be active.
**Expiration:** The access token is valid for **1 hour** and the refresh token is valid for **2 hours**.

Endpoint: POST /direct/login
Version: v3

## Request fields (application/json):

  - `apikey` (string, required)
    Customer host API key

  - `secret` (string, required)
    Customer host API secret

## Request examples:

  - `Login Request` (unknown)
    Login Request

## Response 200:

  - `200` (unknown)
    Authentication successful

## Response 200 fields (application/json):

  - `token` (string)
    Access token (JWT). Send as `Authorization: Bearer <token>` on subsequent calls.

  - `expires` (integer)
    Access-token validity in seconds

  - `refresh` (string)
    Refresh token used to obtain a new access token without re-authenticating

## Response 200 headers (application/json):

  - `X-Request-Id` (string)
    Correlation id for this request. Quote it when reporting a problem - it identifies the call, and every bureau call it triggered, in the API log. Send your own X-Request-Id to correlate with your systems; a malformed value is replaced.

## Response 401:

  - `401` (unknown)
    Unauthorized

## Response 401 fields (application/json):

  - `timestamp` (string)

  - `codes` (array)

  - `messages` (array)

  - `details` (array)

## Response 401 headers (application/json):

  - `X-Request-Id` (string)
    Correlation id for this request. Quote it when reporting a problem - it identifies the call, and every bureau call it triggered, in the API log. Send your own X-Request-Id to correlate with your systems; a malformed value is replaced.

## Response 200 examples:

  - `Login Response` (unknown)
    Login Response

## Response 401 examples:

  - `Wrong API Key or Secret` (unknown)
    Wrong API Key or Secret

  - `Locked Out` (unknown)
    Locked Out

  - `Host Disabled` (unknown)
    Host Disabled

  - `Customer Disabled` (unknown)
    Customer Disabled

