Add a MFA verification

POST /api/my-account/mfa-verifications

Add a MFA verification to the user, a logto-verification-id in header is required for checking sensitive permissions.

application/json

Body object Required

One of:

Responses

  • 204

    No Content

  • 400

    Bad Request

  • 401

    Unauthorized

  • 403

    Forbidden

  • 422

    Unprocessable Content

POST /api/my-account/mfa-verifications
curl \
 --request POST 'https://[tenant_id].logto.app/api/my-account/mfa-verifications' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"type":"string","newIdentifierVerificationRecordId":"string","name":"string"}'
{
  "type": "string",
  "newIdentifierVerificationRecordId": "string",
  "name": "string"
}
{
  "type": "string",
  "secret": "string"
}
{
  "type": "string",
  "codes": [
    "string"
  ]
}
{
  "type": "WebAuthn",
  "newIdentifierVerificationRecordId": "string",
  "name": "string"
}
{
  "type": "TOTP",
  "secret": "string"
}
{
  "type": "BackupCode",
  "codes": [
    "string"
  ]
}