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

# Authorize User

> Authorize and obtain an access token



## OpenAPI

````yaml /api-reference/openapi.json post /api/v1/authorize
openapi: 3.1.0
info:
  title: ekiden-gateway
  description: >-
    API Gateway and WebSocket proxy based on Axum and Utoipa, handling auth,
    rate limiting, and connection buffering.
  license:
    name: ''
  version: 0.1.1
servers:
  - url: https://api.ekiden.fi/
    description: Production
  - url: https://api.staging.ekiden.fi/
    description: Staging
  - url: https://api.dev.ekiden.fi/
    description: Development
  - url: http://localhost:4020/
    description: Local
security: []
paths:
  /api/v1/authorize:
    post:
      tags:
        - User
      summary: Authorize User
      description: Authorize and obtain an access token
      operationId: authorize
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AuthorizeRequest'
        required: true
      responses:
        '200':
          description: Successfully authorized and token generated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthorizeResponse'
components:
  schemas:
    AuthorizeRequest:
      type: object
      required:
        - signature
        - public_key
        - timestamp_ms
        - nonce
      properties:
        full_message:
          type:
            - string
            - 'null'
          description: >-
            Optional Aptos Wallet Standard full message (APTOS-prefixed,
            newline-delimited).

            If provided, the backend will verify the signature against this
            exact string

            and also validate that it contains `message:
            AUTHORIZE|{timestamp_ms}|{nonce}` and a matching `nonce:`.


            Example:


            APTOS\nmessage:
            AUTHORIZE|1731541800000|b7d1c2e8f5a94f3db2f8c6a9d1e4\nnonce:
            b7d1c2e8f5a94f3db2f8c6a9d1e4
        nonce:
          type: string
          description: 'Example: b7d1c2e8f5a94f3db2f8c6a9d1e4'
        public_key:
          type: string
          description: >-
            Example:
            0xa9d81da788977638194c857b918f12ff2233c7a86e82b44705761b2d02426f6d
        signature:
          type: string
          description: >-
            Example:
            0xf5ec808e52d014f5193eccf680acf84c6256bdddb0159088e7cb18d74b9c590b92eb4381e10307fccc0868612993dfb9a542257aab22d7a3decfda33045fb905
        timestamp_ms:
          type: integer
          format: int64
          description: 'Example: 1731541800000'
    AuthorizeResponse:
      type: object
      required:
        - token
        - user_id
      properties:
        token:
          type: string
        user_id:
          $ref: '#/components/schemas/UserId'
    UserId:
      type: string
      format: uuid

````