Verify verification code

POST /api/verifications/verification-code/verify

Verify the provided verification code against the identifier. If successful, the verification record will be marked as verified.

application/json

Body Required

  • identifier object Required

    The identifier (email address or phone number) to verify the code against. Must match the identifier used to send the verification code.

    Hide identifier attributes Show identifier attributes object
    • type string Required

      Values are email or phone.

    • value string Required
  • verificationId string Required

    The verification ID of the CodeVerification record.

  • code string Required

    The verification code to be verified.

Responses

  • 200 application/json

    The verification code has been successfully verified.

    Hide response attribute Show response attribute object
  • The verification code is invalid or the maximum number of attempts has been exceeded. Check the error message for details.

  • Unauthorized

  • Forbidden

  • The connector for sending the verification code is not configured.

POST /api/verifications/verification-code/verify
curl \
 -X POST https://[tenant_id].logto.app/api/verifications/verification-code/verify \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"identifier":{"type":"email","value":"string"},"verificationId":"string","code":"string"}'
Request examples
{
  "identifier": {
    "type": "email",
    "value": "string"
  },
  "verificationId": "string",
  "code": "string"
}
Response examples (200)
{
  "verificationRecordId": "string"
}