Get TOTP Recovery Codes (beta)

POST /v1/auth/totps/recovery_codes

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

HTTP Request

POST /v1/auth/totps/recovery_codes

Returns

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

application/json

Body

  • user_id string Required

    Required User ID to retrieve TOTP recovery codes for.

    Minimum length is 1.

Responses

  • 200 application/json

    OK

    Hide response attributes Show response attributes object
    • user_id string Required

      Minimum length is 1.

    • totps array[object] Required

      At least 1 element.

      Hide totps attributes Show totps attributes object
POST /v1/auth/totps/recovery_codes
curl \
 -X POST https://api.streambird.io/v1/auth/totps/recovery_codes \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"user_id":"user_26l7dbfAY59ftejmm6m3OTf4oz1"}'
Request example
{
  "user_id": "user_26l7dbfAY59ftejmm6m3OTf4oz1"
}
Response examples (200)
{
  "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"
      ]
    }
  ]
}