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

# Verify OTP code

> Verify a one-time passcode and return session tokens. The user_id parameter is the challenge token returned from the /otps/login endpoint.



## OpenAPI

````yaml /swagger.json post /v1/auth/{app_id}/otps/verify
openapi: 3.0.1
info:
  title: Scute API
  version: v1
  description: API for managing users in Scute applications
servers:
  - url: https://{defaultHost}
    variables:
      defaultHost:
        default: api.scute.io
  - url: http://localhost:3333
    description: Development server
security:
  - apiSecret: []
    userAccess: []
paths:
  /v1/auth/{app_id}/otps/verify:
    parameters:
      - name: app_id
        in: path
        required: true
        description: App ID
        schema:
          type: string
    post:
      tags:
        - OTP
      summary: Verify OTP code
      description: >-
        Verify a one-time passcode and return session tokens. The user_id
        parameter is the challenge token returned from the /otps/login endpoint.
      operationId: verifyOtp
      parameters: []
      responses:
        '200':
          description: OTP verified successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  access:
                    type: string
                    description: JWT access token
                  refresh:
                    type: string
                    description: JWT refresh token
                  csrf:
                    type: string
                    description: CSRF token for protected operations
                  access_expires_at:
                    type: string
                    format: date-time
                    description: Access token expiration timestamp
                  refresh_expires_at:
                    type: string
                    format: date-time
                    description: Refresh token expiration timestamp
                  user_id:
                    type: string
                    description: App user ID
                  key_id:
                    type: string
                    description: App key ID for JWT verification
        '400':
          description: missing OTP parameter
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: OTP parameter required
                  error_code:
                    type: string
                    example: otp_required
        '403':
          description: login blocked
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Login blocked for security reasons
                  error_code:
                    type: string
                    example: security_block
        '404':
          description: challenge not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Challenge not found
                  error_code:
                    type: string
                    example: challenge_not_found
components:
  securitySchemes:
    apiSecret:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: API Secret token
    userAccess:
      type: apiKey
      name: X-Authorization
      in: header
      description: User Access token

````