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

# Get TOTP Recovery Codes (beta)

> Get TOTP (time-based one-time passcode) recovery codes of the given user ID.
## Returns

A successful response returns an object with `user_id` and `totps` properties that contain the recovery codes.



## OpenAPI

````yaml post /v1/auth/totps/recovery_codes
openapi: 3.1.0
info:
  title: MoonKey Auth API
  description: >-
    Explore all the details of MoonKey Auth API. All of our APIs are RESTful and
    accept and return JSON.
  version: v1
servers:
  - url: https://api.moonkey.fun
    description: Production
    variables: {}
security:
  - Authorization: []
tags:
  - name: Users
    description: User management API
  - name: Magic Links
    description: ''
  - name: OTPs
    description: >-
      Send OTP (One-time passcodes) by all the supported delivery methods such
      as SMS, email.
  - name: OAuth
    description: ''
  - name: Wallets Login
    description: ''
  - name: Managed Wallets
    description: ''
  - name: Wallet Import
    description: >-
      Import existing wallets into the platform using secure HPKE encryption.
      This flow ensures raw entropy (seed phrases or private keys) never touches
      the server in plaintext.
externalDocs:
  url: ''
  description: ''
paths:
  /v1/auth/totps/recovery_codes:
    parameters: []
    post:
      tags:
        - TOTP (Time-based one-time passcode)
      summary: Get TOTP Recovery Codes (beta)
      description: >-
        Get TOTP (time-based one-time passcode) recovery codes of the given user
        ID.

        ## Returns


        A successful response returns an object with `user_id` and `totps`
        properties that contain the recovery codes.
      operationId: GetTOTPRecoveryCodes
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetTOTPRecoveryCodesRequest'
            examples:
              GetTOTPRecoveryCodesReq:
                value:
                  user_id: user_26l7dbfAY59ftejmm6m3OTf4oz1
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                description: ''
                type: object
                properties:
                  user_id:
                    type: string
                    minLength: 1
                  totps:
                    type: array
                    uniqueItems: true
                    minItems: 1
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          minLength: 1
                        verified:
                          type: boolean
                        recovery_codes:
                          type: array
                          items:
                            type: string
                      required:
                        - id
                        - verified
                        - recovery_codes
                required:
                  - user_id
                  - totps
              examples:
                GetTOTPRecoveryCodesResp:
                  value:
                    user_id: user_26l7dbfAY59ftejmm6m3OTf4oz1
                    totps:
                      - id: totp_27LbM1TMjS3gQN1vuzb1jn8Fshw
                        verified: true
                        recovery_codes:
                          - xwbwb-07bjt
                          - 5jsr0-9nepk
                          - 25gj8-2lzmw
                          - sfmcz-s7o2f
                          - 5p9k1-01g2c
                          - 5p5gx-8tlvl
                          - l31kr-xwd2f
                          - cfz0j-dq8rz
                          - st3hz-xgs86
                          - drydx-is8j6
                          - 48qm5-na80k
                          - 36vyz-s6lsz
                          - umzq0-iyp0g
                          - nwrnu-68loe
                          - 797ne-vd5lm
                          - zaafh-7zdhk
components:
  schemas:
    GetTOTPRecoveryCodesRequest:
      description: ''
      type: object
      properties:
        user_id:
          type: string
          minLength: 1
          description: '`Required` User ID to retrieve TOTP recovery codes for.'
      required:
        - user_id
  securitySchemes:
    Authorization:
      type: http
      scheme: bearer
      description: >-
        Auth Platform API includes all the Auth related features. All Users,
        Phone Numbers, Emails, and OTPs are associated with an `App` as the
        container.


        Endpoints only accept App's `Secret API keys` other than certain
        endpoints that are used client side or via SDK that accept the
        `public_token`.


        ## Authentication using App Api Key


        ## Header:


        ```

        Authorization: Bearer {api_key}

        ```


        ## Authenticated Request


        ```curl

        curl \
          -X GET https://api.moonkey.fun/v1/auth/users/user_24wFP9pDa9YiMJLun94iKykoZs2 \
          -H "Authorization: Bearer sk_test_pRqweh3wvWmJAAVYv7Z0T5iPLzFM4ql0muoyQcjOxGeN3p1r"
        ```

````