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

# Exchange 2Fa Challenge

> Exchange a 2fa_pending challenge token + code for real tokens.



## OpenAPI

````yaml https://api.apilens.ai/api/v1/openapi.json post /api/v1/auth/2fa/exchange
openapi: 3.1.0
info:
  title: APILens API
  version: 1.0.0
  description: API Observability Platform
servers: []
security: []
paths:
  /api/v1/auth/2fa/exchange:
    post:
      tags:
        - Auth
      summary: Exchange 2Fa Challenge
      description: Exchange a 2fa_pending challenge token + code for real tokens.
      operationId: api_auth_router_exchange_2fa_challenge
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TwoFactorExchangeRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenResponse'
components:
  schemas:
    TwoFactorExchangeRequest:
      properties:
        challenge_token:
          title: Challenge Token
          type: string
        code:
          title: Code
          type: string
        remember_me:
          default: true
          title: Remember Me
          type: boolean
        use_backup_code:
          default: false
          title: Use Backup Code
          type: boolean
      required:
        - challenge_token
        - code
      title: TwoFactorExchangeRequest
      type: object
    TokenResponse:
      properties:
        access_token:
          title: Access Token
          type: string
        refresh_token:
          title: Refresh Token
          type: string
        token_type:
          default: Bearer
          title: Token Type
          type: string
        expires_in:
          default: 900
          title: Expires In
          type: integer
      required:
        - access_token
        - refresh_token
      title: TokenResponse
      type: object

````