Responses

  • 200 application/json

    TOTP setup payload

    Hide response attributes Show response attributes object
    • code integer
    • message string
    • data object
      Hide data attributes Show data attributes object
      • url string

        otpauth URL to generate the QR code client-side

      • key string

        Shared TOTP secret generated for the user

  • 400 application/json

    Failed to generate or persist the user secret

    Hide response attributes Show response attributes object
    • code integer
    • message string
    • data
    • error string
  • 401 application/json

    Unauthorized

    Hide response attributes Show response attributes object
    • code integer
    • message string
    • data
    • error string
GET /2fa/qr-code
curl \
 --request GET 'http://localhost:8080/2fa/qr-code' \
 --header "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
  "code": 42,
  "message": "string",
  "data": {
    "url": "string",
    "key": "string"
  }
}
Response examples (400)
{
  "code": 42,
  "message": "string",
  "error": "string"
}
Response examples (401)
{
  "code": 42,
  "message": "string",
  "error": "string"
}