Create an MFA verification for a user

POST /api/users/{userId}/mfa-verifications

Create a new MFA verification for a given user ID.

Path parameters

  • userId string Required

    The unique identifier of the user.

application/json

Body Required

Responses

  • 200 application/json

    The MFA verification that was created.

    One of:
    Hide attributes Show attributes
    • type string("Totp") Required
    • secret string Required
    • secretQrCode string Required
  • 400

    Bad Request

  • 401

    Unauthorized

  • 403

    Forbidden

  • 404

    Not Found

  • 422

    Unprocessable Content

POST /api/users/{userId}/mfa-verifications
curl \
 --request POST 'https://[tenant_id].logto.app/api/users/{userId}/mfa-verifications' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"type":"string"}'
Request examples
{
  "type": "string"
}
Response examples (200)
{
  "type": "string",
  "secret": "string",
  "secretQrCode": "string"
}
{
  "type": "string",
  "codes": [
    "string"
  ]
}