/otp/send
✅ Email as user_id
user_id
These are the possible response codes when you make an API call to the /otp/send
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 a429 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 code | Error | Message | Scenario | Resolution |
---|---|---|---|---|
- | getaddrinfo ENOTFOUND | "Could not send request" | Incorrect environment value in URL | Enter the correct environment value in the URL. |
200 OK | - | - | Send OTP successfully | - |
200 OK | - | - | Missing message value as well as %code% | - |
200 OK | - | - | Remove message parameter | - |
200 OK | - | - | Missing locale value | - |
200 OK | - | - | Removed locale value | - |
400 Bad Request | http_exception | "Invalid json format" | Empty payload | Add the payload. |
400 Bad Request | invalid_parameters | "Invalid json format" | Invalid JSON format used in the payload. | Use correct JSON format for the payload. |
400 Bad Request | invalid_domain | "Invalid API usage" | Incorrect environment ID in URL | Enter the correct environment ID in the URL. |
401 Unauthorized | http_exception | "message": "Unauthorized" | Expired access_token | Use a fresh token. |
403 Forbidden | http_exception | "Forbidden" | Incorrect client_id value | Enter a valid client_id value. |
422 Unprocessable Entity | invalid_parameters | "client_id": { "missing": "required" } no error description | Missing client_id value | Enter a valid client_id value. |
422 Unprocessable Entity | invalid_parameters | "client_id": "field required" | Removed client_id parameter | Add the client_id parameter and value. |
422 Unprocessable Entity | invalid_user | "invalid": "invalid value" no error description | Invalid user_id (not existing) | Enter a valid user_id value. |
422 Unprocessable Entity | invalid_parameters | "user_id": { "invalid": "invalid format" } no error description | Missing user_id value | Enter a valid user_id value. |
422 Unprocessable Entity | invalid_parameters | "user_id": "field required" | Removed user_id parameter | Add the user_id parameter and value. |
422 Unprocessable Entity | invalid_parameters | "auth_type": { "invalid": "unsupported auth_type value" } no error description | Invalid auth_type value | Enter a valid auth_type value. |
422 Unprocessable Entity | invalid_parameters | "auth_type": { "invalid": "unsupported auth_type value" } no error description | Missing auth_type value | Enter a valid auth_type value. |
422 Unprocessable Entity | invalid_parameters | "auth_type": "field required" | Removed auth_type parameter | Add the auth_type parameter and value. |
422 Unprocessable Entity | invalid_parameters | "redirect_uri":{ "invalid": "invalid value" } no error description | Invalid redirect_uri value:"Non-existing value" | Enter a valid redirect_uri value. |
422 Unprocessable Entity | invalid_parameters | "redirect_uri": { "invalid": "invalid value" } no error description | Invalid redirect_uri value:"Correct URL, but not part of whitelist" | Use a valid redirect_uri value that's part of the whitelist. |
422 Unprocessable Entity | invalid_parameters | "error_details": null, "error_description": "Missing Parameter: redirect_uri" | Missing redirect_uri value | Enter a valid redirect_uri value. |
422 Unprocessable Entity | invalid_parameters | "redirect_uri": "field required" | Removed redirect_uri parameter | Add the redirect_uri parameter and value. |
422 Unprocessable Entity | unexpected_error | "error_details": null, "error_description": "could not find a flow named 'standard_global' with version '20220207155201304965' and locale 'xxxx' " | Invalid locale value | Enter a valid locale value. |
429 Too Many Requests | user_attempts_limits | "Too many requests" | Attempts rate limit exceeded ( 5 attempts in one minute) | Limit calls to the endpoint within the rate limit. |
503 Service Temporarily Unavailable | - | "Backend action does not exist" | Invalid version number in URL | Enter a valid version number in the URL. |
✅ Mobile phone number as user_id
user_id
These are the possible response codes when you make an API call to the /otp/send
endpoint using a mobile phone number as user_id
.
Response code | Error | Message | Scenario | Resolution |
---|---|---|---|---|
- | getaddrinfo ENOTFOUND | "Could not send request" | Incorrect environment value in URL | - |
200 OK | - | - | Send OTP successfully | - |
200 OK | - | - | Change text message from Hello please copy your code %code% to HI there, please copy your code %code% | - |
200 OK | - | - | Missing redirect_uri , sent OTP in registered mobile | - |
200 OK | - | - | Invalid locale value | - |
200 OK | - | - | Missing locale value | - |
200 OK | - | - | Removed locale value | - |
400 Bad Request | invalid_domain | "Invalid API usage" | Incorrect environment ID in URL | Enter a valid environment ID in the URL |
403 Forbidden | http_exception | "Forbidden" | Incorrect client_id value | Enter a valid client_id value. |
422 Unprocessable Entity | invalid_parameters | "client_id": { "missing": "required" } no error description | Missing client_id value | Enter a valid client_id value. |
422 Unprocessable Entity | invalid_parameters | "client_id": "field required" | Removed client_id parameter | Add the client_id parameter and value. |
422 Unprocessable Entity | invalid_parameters | "user_id": { "invalid": "invalid value" } no error description | Invalid user_id (not existing) | Enter a valid user_id value. |
422 Unprocessable Entity | invalid_parameters | "user_id": { "invalid": "invalid value" } no error description | Missing user_id value | Enter a valid user_id value. |
422 Unprocessable Entity | invalid_parameters | "user_id": "field required" | Removed user_id parameter | Add the user_id parameter and value. |
422 Unprocessable Entity | invalid_parameters | "auth_type": { "invalid": "unsupported auth_type value" } no error description | Invalid auth_type | Enter a valid auth_type value. |
422 Unprocessable Entity | invalid_parameters | "auth_type": { "invalid": "unsupported auth_type value" } no error description | Missing auth_type value | Enter a valid auth_type value. |
422 Unprocessable Entity | invalid_parameters | "auth_type": "field required" | Removed auth_type parameter | Add the auth_type parameter and value. |
422 Unprocessable Entity | invalid_parameters | "redirect_uri": { "invalid": "invalid value" } no error description | Invalid redirect_uri value:"non-existing value" | Enter a valid redirect_uri value. |
422 Unprocessable Entity | invalid_parameters | "redirect_uri": { "invalid": "invalid value" } no error description | Invalid redirect_uri value:Correct URL, but not part of whitelist | Use a valid redirect_uri value that's part of the whitelist. |
422 Unprocessable Entity | invalid_parameters | "redirect_uri":"field required" | Removed redirect_uri parameter | Add the redirect_uri parameter and value. |
500 Internal Server Error | http_exception | "message":"Internal Server Error" | Removed message value as well as %code% text | Add the message parameter and value as well as the %code% text. |
500 Internal Server Error | http_exception | "message":"Internal Server Error" | Removed message parameter | Add the message parameter and value. |
503 Service Temporarily Unavailable | - | "Backend action does not exist" | Invalid version number in URL | Enter a valid version number in the URL. |