/otp/verify

✅ Email as user_id

These are the possible response codes when you make an API call to the /otp/verify endpoint using an email address as user_id.

⚠️

Warning

If the /token endpoint receives five (5) attempts (either successful or failed) within a minute, it will return a 429 Too Many Requests error response. This will block the user account for 5 minutes and will automatically be unblocked when the time has passed.

Response codeErrorMessageScenarioResolution
200 OK--Verify OTP successfully-
200 OK--Invalid redirect_uri-
200 OK--Missing redirect_uri value-
200 OK--Remove redirect_uri parameter-
200 OK--Missing locale value-
200 OK--Remove locale value-
400 Bad Requesthttp_exception"Invalid json format"Empty payloadAdd the payload.
400 Bad Requestinvalid_parameters"Invalid json format"Invalid JSON format used in the payload.Use correct JSON format for the payload.
403 Forbiddenhttp_exception"Forbidden"Invalid client_id (not existing)Enter a valid client_id value.
422 Unprocessable Entityinvalid_code'"message": "Please enter a valid verification code."

no error description
Enter an incorrect codeEnter a valid code value.
422 Unprocessable Entityinvalid_code'"message": "Please enter a valid verification code."

no error description
Enter an invalid codeEnter a valid code value.
422 Unprocessable Entityinvalid_code'"code": "field required"Removed code parameterAdd the code parameter and value.
422 Unprocessable Entityinvalid_parameters'"client_id":{
"missing": "required"
}

no error description
Missing client_id valueEnter a valid client_id value.
422 Unprocessable Entityinvalid_parameters'"client_id": "field required"Removed client_id parameterAdd the client_id parameter and value.
422 Unprocessable Entityinvalid_parameters'"user_id":{
"invalid": "invalid value"
}

no error description
Invalid user_id "not existing"Enter a valid user_id value.
422 Unprocessable Entityinvalid_parameters'"user_id":{
"invalid": "invalid fomat"
}

no error description
Missing user_id valueEnter a valid user_id value.
422 Unprocessable Entityinvalid_parameters'"user_id": "field required"Removed user_id parameterAdd a user_id parameter and value.
422 Unprocessable Entityinvalid_parameters'"auth_type":{
"invalid": "unsupported auth_type value"
}

no error description
Invalid auth_type valueEnter a valid auth_type value.
422 Unprocessable Entityinvalid_parameters'"auth_type":{
"invalid": "unsupported auth_type value"
}

no error description
Missing auth_type valueEnter a valid auth_type value.
422 Unprocessable Entityinvalid_parameters'"auth_type":"field required"Removed auth_type parameterAdd the auth_type parameter and value.
422 Unprocessable Entityinvalid_parameters'"message":"Please enter a valid verification code."

no error description
Expired OTP codeUse a fresh OTP code.
429 Too Many Requestsuser_attempts_limits"Too many requests"Attempts rate limit exceeded ( 5 attempts in one minute)
502 Bad Gateway--Did not enter code or Missing code valueEnter a valid code value.
502 Bad Gateway--Invalid locale valueEnter a valid code value.

✅ Mobile phone number as user_id

These are the possible response codes when you make an API call to the /otp/verify endpoint using a mobile phone number as user_id.

Response codeErrorMessageScenarioT
getaddrinfo ENOTFOUND"Could not send request"Invalid environment IDEnter a valid environment ID.
200 OK--Successfully verified OTP send from mobile number-
200 OK--Invalid redirect_uri-
200 OK--Invalid redirect_uri (Correct URL but not part of the host whitelist)-
200 OK--Missing redirect_uri value-
200 OK--Remove redirect_uri value-
200 OK--Missing locale value-
200 OK--Remove locale parameter-
403 Forbiddenhttp_exception"Forbidden"Invalid client_id valueEnter a valid client_id value.
422 Unprocessable Entityinvalid_parameters"client_id": {
"missing": "required"
}

no error description
Missing client_id valueEnter a valid client_id value.
422 Unprocessable Entityinvalid_parameters"client_id": "field required"Removed client_id parameterAdd the client_id parameter and value.
422 Unprocessable Entityinvalid_code"message": "Please enter a valid verification code."

no error description
Invalid code value
422 Unprocessable Entityinvalid_code"message": "Please enter a valid verification code."

no error description
Expired code valueEnter a valid code value.
422 Unprocessable Entityinvalid_parameters"code": "field required"Removed code parameterAdd the code parameter and value.
422 Unprocessable Entityinvalid_parameters"user_id": {
"invalid": "invalid value"
}

no error description
Invalid user_id valueEnter a valid user_id value.
422 Unprocessable Entityinvalid_parameters"user_id": {
"invalid": "invalid format"
}

no error description
Missing user_id valueEnter a valid user_id value.
422 Unprocessable Entityinvalid_parameters"user_id": "field required"Removed user_id parameterAdd the user_id parameter and value.
422 Unprocessable Entityinvalid_parameters"auth_type": {
"invalid": "unsupported auth_type value"
}

no error description
Invalid auth_typeEnter a valid auth_type value.
422 Unprocessable Entityinvalid_parameters"auth_type": {
"invalid": "unsupported auth_type value"
}

no error description
Missing auth_typeEnter a valid auth_type value.
422 Unprocessable Entityinvalid_parameters"auth_type": "field required"Removed auth_type parameterAdd the auth_type parameter and value.
429 Too Many Requestsuser_attempts_limit"Too many requests"Attempts rate limit exceeded ( 5 attempts in one minute)Limit calls to the endpoint within the rate limit.
502 Bad Gateway--Missing code valueEnter a valid code value.
502 Bad Gateway--Invalid locale valueEnter a valid code value.
503 Service Temporarily Unavailable-"Backend action does not exist"Invalid version NumberEnter a valid version number.