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

# SIWE Challenge

> Create a host-bound SIWE message and nonce for wallet sign-in.

Creates an EIP-4361 SIWE challenge for a wallet address and chain.

* Auth: none
* Rate limit tier: Tier 2
* Origin policy: request must come from an allowlisted origin/host

Common error responses:

* `400` when `chainId` is invalid, unsupported, or missing SIWE RPC configuration (`JSON_RPC_URL_<chainId>`)
* `400` for malformed request payload or SIWE input mismatch
* `403` when request origin/host is not allowlisted for SIWE

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url 'https://api.glider.fi/v1/auth/siwe/challenge' \
    --header 'Content-Type: application/json' \
    --header 'Origin: https://app.glider.fi' \
    --data '{
      "address": "0x1111111111111111111111111111111111111111",
      "chainId": 8453
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "message": "app.glider.fi wants you to sign in with your Ethereum account:\n0x1111111111111111111111111111111111111111\n\nSign in to Glider.\n\nURI: https://app.glider.fi\nVersion: 1\nChain ID: 8453\nNonce: 0f8f1f5f3c4248dfae34a7f8fd2de18e\nIssued At: 2026-03-05T00:00:00.000Z\nExpiration Time: 2026-03-05T00:10:00.000Z",
    "nonce": "0f8f1f5f3c4248dfae34a7f8fd2de18e",
    "domain": "app.glider.fi",
    "uri": "https://app.glider.fi",
    "issuedAt": "2026-03-05T00:00:00.000Z",
    "expiresAt": "2026-03-05T00:10:00.000Z",
    "chainId": 8453
  }
  ```
</ResponseExample>
