Verify the provided verification code against the user's identifier. If successful, the verification record will be marked as verified. For a code sent to the subject the interaction carries (an identifier with only its type), the identifier likewise carries only its type: the code is verified against the identifier the record was sent to, and the request never carries a raw identifier.
Body
Required
-
The verification ID of the CodeVerification record.
-
The verification code to be verified.
Responses
-
The verification code was successfully verified.
-
The verification code is invalid or the maximum number of attempts has been exceeded. Check the error message for details.
-
Forbidden
-
Verification record not found, or the identifier carried only its type but the interaction carries no subject or the record was not created for the subject.
-
The connector for sending the verification code is not configured.
curl \
--request POST 'https://[tenant_id].logto.app/api/experience/verification/verification-code/verify' \
--header "Content-Type: application/json" \
--data '{
"identifier": {
"type": "string",
"value": "string"
},
"verificationId": "string",
"code": "string"
}'
{
"identifier": {
"type": "string",
"value": "string"
},
"verificationId": "string",
"code": "string"
}
{
"verificationId": "string"
}