# Get pre-auth token by user ID

Generates a short-lived pre-auth token for the specified user.
**Parameters:** The `{id}` path parameter is the user's unique identifier (UUID).
**Flow:** The returned token is used to establish a user session via `GET /users/preauth-token/{preauthToken}`.
**Requirements:** The user must be active.
**Expiration:** The token is valid for **30 seconds**.

Endpoint: GET /direct/preauth-token/{id}
Version: v3
Security: directToken

## Security:

  - `directToken` (unknown)
    http bearer JWT

## Path parameters:

  - `id` (string, required)

## Response 200:

  - `200` (unknown)
    Pre-auth token generated

## Response 200 fields (application/json):

  - `token` (string)
    Pre-auth token (JWT). Hand to the widget or to your client app, then exchange via `GET /users/preauth-token/{preauthToken}`. **Valid for 30 seconds** — generate it on demand.

  - `userId` (string)
    ID of the user this token is bound to

## 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 400:

  - `400` (unknown)
    Bad request

## Response 400 fields (application/json):

  - `timestamp` (string)

  - `codes` (array)

  - `messages` (array)

  - `details` (array)

## Response 400 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:

  - `Preauth Token` (unknown)
    Preauth Token

## Response 400 examples:

  - `User Not Found` (unknown)
    User Not Found

  - `Account Closed` (unknown)
    Account Closed

  - `Unauthorized Access` (unknown)
    Unauthorized Access

  - `Customer Not Found` (unknown)
    Customer Not Found

## Response 401 examples:

  - `Host Disabled` (unknown)
    Host Disabled

  - `Customer Disabled` (unknown)
    Customer Disabled

  - `User Disabled` (unknown)
    User Disabled

