Verify verification code

POST /api/experience/verification/verification-code/verify

Verify the provided verification code against the user's 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
    • 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 was successfully verified.

    Hide response attribute Show response attribute object
    • verificationId string Required

      he unique ID of the verification record. Required for user identification via the Identification API or to bind the identifier to the user's account via the Profile API.

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

  • Verification record not found.

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

POST /api/experience/verification/verification-code/verify
curl \
 -X POST https://[tenant_id].logto.app/api/experience/verification/verification-code/verify \
 -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)
{
  "verificationId": "string"
}

Verify a verification code

POST /api/verification-codes/verify

Verify a verification code for a specified identifier. if you're using email as the identifier, you need to setup your email connector first. if you're using phone as the identifier, you need to setup your SMS connector first.

application/json

Body object Required

One of:

Responses

  • Verification code verified successfully.

  • Bad request. The payload may be invalid.

  • Unauthorized

  • Forbidden

POST /api/verification-codes/verify
curl \
 -X POST https://[tenant_id].logto.app/api/verification-codes/verify \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"email":"string","verificationCode":"string"}'
Request examples
{
  "email": "string",
  "verificationCode": "string"
}
{
  "phone": "string",
  "verificationCode": "string"
}