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:
  • email string(regex) Required

    Format should match the following pattern: /^\S+@\S+\.\S+$/.

  • verificationCode string Required

    Minimum length is 1.

Responses

  • Verification code verified successfully.

  • Bad request. The payload may be invalid.

  • Unauthorized

  • Forbidden

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