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

# Sign in via API

> Authenticates and authorizes a user to the UQPAY API. The authentication token is required to make requests to all other endpoints in the UQPAY API. Tokens expire after 10 minutes of inactivity.

### Header

<ParamField header="x-client-id" type="string" required>
  `x-client-id`.
</ParamField>

<ParamField header="x-api-key" type="string" required>
  `x-api-key`
</ParamField>

### Response

<ResponseField name="code" type="number">
  Indicates whether the call was successful. 200 if successful, 400 if not.
</ResponseField>

<ResponseField name="message" type="string">
  Response Message. "Success" if successful, others not.
</ResponseField>

<ResponseField name="data" type="object">
  <Expandable title="Toggle object" defaultOpen>
    <ResponseField name="auth_token" type="string">
      Authentication token returned
    </ResponseField>

    <ResponseField name="expired_at" type="string">
      expires in seconds
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash cURL Example Request theme={null}
  curl 'https://api.sandbox.uqpay.org/api/v1/auth/signin' \
  -H 'content-type: application/json' \
  -H 'x-api-key: a6b0b414c936bc677f83fc48b6b12e7e986e2d8e2be76ff5243566cf5dce17ab' \
  -H 'x-client-id: Up1HIsjiETPXLy7gON9PMG'
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
      "code": 200,
      "message": "Success",
      "data": {
          "auth_token": "c49f455cf2f768140b5e672d0f199b74",
          "expired_at": 1696431603
      }
  }
  ```
</ResponseExample>
