/otp/send

✅ Email as 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 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
-getaddrinfo ENOTFOUND"Could not send request"Incorrect environment value in URLEnter 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 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.
400 Bad Requestinvalid_domain"Invalid API usage"Incorrect environment ID in URLEnter the correct environment ID in the URL.
401 Unauthorizedhttp_exception"message": "Unauthorized"Expired access_tokenUse a fresh token.
403 Forbiddenhttp_exception"Forbidden"Incorrect 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_user"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 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_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"redirect_uri":{
"invalid": "invalid value"
}

no error description
Invalid redirect_uri value:
"Non-existing value"
Enter a valid redirect_uri value.
422 Unprocessable Entityinvalid_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 Entityinvalid_parameters"error_details": null,
"error_description": "Missing Parameter: redirect_uri"
Missing redirect_uri valueEnter a valid redirect_uri value.
422 Unprocessable Entityinvalid_parameters"redirect_uri": "field required"Removed redirect_uri parameterAdd the redirect_uri parameter and value.
422 Unprocessable Entityunexpected_error"error_details": null,
"error_description": "could not find a flow named 'standard_global' with version '20220207155201304965' and locale 'xxxx' "
Invalid locale valueEnter a valid locale value.
429 Too Many Requestsuser_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 URLEnter a valid version number in the URL.

✅ Mobile phone number as 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 codeErrorMessageScenarioResolution
-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 Requestinvalid_domain"Invalid API usage"Incorrect environment ID in URLEnter a valid environment ID in the URL
403 Forbiddenhttp_exception"Forbidden"Incorrect 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_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 value"
}

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_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"redirect_uri": {
"invalid": "invalid value"
}

no error description
Invalid redirect_uri value:
"non-existing value"
Enter a valid redirect_uri value.
422 Unprocessable Entityinvalid_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 Entityinvalid_parameters"redirect_uri":"field required"Removed redirect_uri parameterAdd the redirect_uri parameter and value.
500 Internal Server Errorhttp_exception"message":"Internal Server Error"Removed message value as well as %code% textAdd the message parameter and value as well as the %code% text.
500 Internal Server Errorhttp_exception"message":"Internal Server Error"Removed message parameterAdd the message parameter and value.
503 Service Temporarily Unavailable-"Backend action does not exist"Invalid version number in URLEnter a valid version number in the URL.