# Mint an access token

Exchange an OAuth access key for a bearer token by providing its `client_id` and `client_secret` in the request body.

Endpoint: POST /access-keys/token
Version: V5
Security: bearerAuth, basicAuth

## Request fields (application/json):

  - `client_id` (string, required)
    OAuth access key client ID returned when the access key was created.

  - `client_secret` (string, required)
    OAuth access key client secret returned when the access key was created or rotated.

## Response 200 fields (application/json):

  - `access_token` (string, required)
    Bearer token to include in the `Authorization` header.

  - `token_type` (string, required)
    Example: Bearer

  - `expires_in` (integer, required)
    Token lifetime in seconds.
    Example: 86400

  - `scope` (string)
    Space-delimited scopes granted to the token.
    Example: merchant:read merchant:write

## Response 400 fields (application/json):

  - `error` (object)

  - `error.message` (string)
    A short string, describing error details
    Example: Validation error

  - `error.type` (string)
    A short string, describing error type
    Enum: "validation_error"

  - `error.details` (array)

  - `error.details.path` (string)
    Path to the field failed validation
    Example: path.to.field

  - `error.details.message` (string)
    Detailed description of the error
    Example: `[field]` is required

## Response 401 fields (application/json):

  - `error` (object)

  - `error.message` (string)
    A short string, describing error details
    Example: Invalid merchant credentials

  - `error.type` (string)
    A short string, describing error type
    Enum: "authentication_error"

## Response 403 fields (application/json):

  - `error` (object)

  - `error.message` (string)
    A short string, describing error details
    Example: API access key expired

  - `error.type` (string)
    A short string, describing error type
    Example: forbidden_error

## Response 404 fields (application/json):

  - `error` (object)

  - `error.message` (string)
    A short string, describing error details
    Example: [entity] not found

  - `error.type` (string)
    A short string, describing error type
    Enum: "not_found_error"

## Response 429 fields (application/json):

  - `error` (object)

  - `error.message` (string)
    A short string, describing error details
    Example: Too many requests

  - `error.type` (string)
    A short string, describing error type
    Enum: "rate_limit_error"

