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

# Get Token

Obtains a merchant API access token used for authentication on subsequent API calls. This endpoint only requires `Api-Key` and `Timestamp` — no `Access-Token` is needed.

## Request Headers

<ParamField header="Api-Key" type="string" required placeholder="your_api_key">
  apiKey (merchant credential, bound to IP whitelist)
</ParamField>

<ParamField header="Timestamp" type="string" required>
  Unix timestamp in milliseconds. The deviation from the server time must be within 60 seconds, and future timestamps are not accepted.
</ParamField>

<ParamField header="Content-Type" type="string" default="application/json">
  Fixed to `application/json`
</ParamField>

## Response Parameters

<ResponseField name="code" type="number">
  Response status code. `0` indicates success.
</ResponseField>

<ResponseField name="msg" type="string">
  Response message.
</ResponseField>

<ResponseField name="data" type="object">
  Response data.

  <Expandable title="data">
    <ResponseField name="access_token" type="string">
      Login token.
    </ResponseField>

    <ResponseField name="expired_time" type="number">
      Expiration time (Unix millisecond timestamp).
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash Request theme={null}
  curl --request GET \
    --url https://sandbox-openplatform.keysecure.io/open-api/v1/merchant/token \
    --header 'Content-Type: application/json' \
    --header 'Api-Key: your_api_key' \
    --header 'Timestamp: 1716307200000'
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "code": 0,
    "msg": "Success",
    "data": {
      "access_token": "",
      "expired_time": 1
    }
  }
  ```
</ResponseExample>
