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

# Запросить токен

> Poll until the user authorizes in the browser. Returns 428 (authorization_pending) while waiting, 429 (slow_down) if polling too fast, 410 (expired_token) if code expired.



## OpenAPI

````yaml POST /customer/v2/auth/device/token
openapi: 3.0.3
info:
  title: OrbitFlare Customer API
  description: >-
    API documentation for the OrbitFlare Customer API. This API allows
    authenticated customers to manage their licenses, whitelist IPs, reset keys,
    and retrieve associated data. Supports v1 (API key only) and v2 (Bearer
    token or API key) with extended features including device/wallet auth, API
    keys management, profile, Solana USDC balance top-up, and RPC plan
    purchasing.
  version: 2.1.0
servers:
  - url: https://orbitflare.com/api
    description: OrbitFlare Production server
security:
  - api_key: []
tags:
  - name: Auth
    description: Authentication (device flow, wallet signature, session)
  - name: Licenses
    description: License management
  - name: API Keys
    description: API key management
  - name: Profile
    description: User profile and balance
  - name: Invoices
    description: Invoice listing, detail, and balance payment
  - name: Top-Up
    description: Balance top-up via Solana USDC
  - name: RPC Plans
    description: Solana RPC plan catalog
  - name: Orders
    description: Order management (validate, purchase, list)
paths:
  /customer/v2/auth/device/token:
    post:
      tags:
        - Auth
      summary: Poll for Token
      description: >-
        Poll until the user authorizes in the browser. Returns 428
        (authorization_pending) while waiting, 429 (slow_down) if polling too
        fast, 410 (expired_token) if code expired.
      operationId: deviceToken
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - device_code
              properties:
                device_code:
                  type: string
                  description: The device_code from /auth/device/code
      responses:
        '200':
          description: User authorized. Token issued.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenResponse'
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2ErrorResponse'
        '404':
          description: Device code not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2ErrorResponse'
        '410':
          description: Device code expired.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2ErrorResponse'
        '428':
          description: Authorization pending. Keep polling.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2ErrorResponse'
        '429':
          description: Polling too fast. Increase interval.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2ErrorResponse'
      security: []
components:
  schemas:
    TokenResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
        data:
          type: object
          properties:
            token_type:
              type: string
              example: Bearer
            access_token:
              type: string
            expires_in:
              type: integer
            user:
              $ref: '#/components/schemas/UserInfo'
    V2ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          example: false
        message:
          type: string
        errors:
          type: object
        error:
          type: string
          description: Error code (e.g. authorization_pending, slow_down)
    UserInfo:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        email:
          type: string
          format: email
        wallet_address:
          type: string
          nullable: true
        payment_wallet_address:
          type: string
          nullable: true
        balance:
          type: number
          format: float
        created_at:
          type: string
          format: date-time
  securitySchemes:
    api_key:
      type: apiKey
      name: X-ORBIT-KEY
      in: header
      description: API key for v1 and v2 (when not using Bearer token)

````