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

# setup OTP

> Setup OTP. Secret must be provided to OtpDataDto in base32-encoded format, just like it comes from GET /{id}/otp/setup method. Device name is arbitrary. Same secret could be used for multiple device names. Same secret could not be used for same device name.



## OpenAPI

````yaml /openapi.json post /api/v1/user/{id}/otp/setup
openapi: 3.0.3
info:
  title: Extractor Project (dev)
  version: 0.0.649
servers: []
security: []
paths:
  /api/v1/user/{id}/otp/setup:
    post:
      tags:
        - User Route
      summary: setup OTP
      description: >-
        Setup OTP. Secret must be provided to OtpDataDto in base32-encoded
        format, just like it comes from GET /{id}/otp/setup method. Device name
        is arbitrary. Same secret could be used for multiple device names. Same
        secret could not be used for same device name.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            format: int64
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OtpDataDto'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseDto'
      security:
        - SecurityScheme: []
components:
  schemas:
    OtpDataDto:
      type: object
      properties:
        secret:
          type: string
        deviceName:
          type: string
        totpCode:
          type: string
    ResponseDto:
      type: object
      properties:
        response:
          type: string
  securitySchemes:
    SecurityScheme:
      type: http
      description: Authentication
      scheme: bearer
      bearerFormat: JWT

````