Verify TOTP verification
Verifies the provided TOTP code against the new created TOTP secret or the existing TOTP secret. If a verificationId is provided, this API will verify the code against the TOTP secret that is associated with the verification record. Otherwise, a new TOTP verification record will be created and verified against the user's existing TOTP secret.
Body Required
-
The TOTP code to be verified.
Minimum length is
1
. -
verificationId string
The verification ID of the newly created TOTP secret. This ID is required to verify a newly created TOTP secret that needs to be bound to the user account. If not provided, the API will create a new TOTP verification record and verify the code against the user's existing TOTP secret.
POST /api/experience/verification/totp/verify
curl \
-X POST https://[tenant_id].logto.app/api/experience/verification/totp/verify \
-H "Content-Type: application/json" \
-d '{"code":"string","verificationId":"string"}'
Request examples
{
"code": "string",
"verificationId": "string"
}
Response examples (200)
{
"verificationId": "string"
}