Error response structure

{
    "responseType": RESPONSE_TYPE_ENUM,
    "statusCode": INTEGER_STATUS_CODE,
    "response": {
        "errorCode": "ERROR_CODE",
        "errorMessage": "ERROR_MESSAGE"
    }
}
  • RESPONSE_TYPE_ENUM - The type of response for which the error occurred. It can be INITIATE, VERIFY, or FAILED.
  • INTEGER_STATUS_CODE - The HTTP status code or a status code curated by Otpless.
  • ERROR_CODE - The error code for the specific error curated by Otpless.
  • ERROR_MESSAGE - The error message that describes the error in detail.

Errors for different Response Types

Bad requests:


Status CodeError CodeError MessageExplanation
4007101Request error: Invalid parameters values or Required parameters are missing.Some required parameters are either missing or have invalid values.
4007102Request error: Invalid phone number.The provided phone number format is incorrect or invalid.
4007103Request error: Invalid phone number delivery channel.The selected delivery channel for the phone number is not supported.
4007104Request error: Invalid email.The provided email address is incorrectly formatted or invalid.
4007105Request error: Invalid email channel.The selected delivery channel for the email is not supported.
4007106Request error: Invalid phoneNumber or email.Either the phone number or email provided is incorrect or missing.
4007113Request error: Invalid expiry.The provided expiry time for OTP or request is invalid.
4007116Request error: OTP Length is invalid. 4 and 6 only allowed.The OTP length must be either 4 or 6 digits.
4007121Request error: Invalid app hash.The provided app hash does not match the expected format.
40004000The request values are incorrect, See details.The provided values do not match the expected format.
40014001The Otpless SDK does not support 2FA as of now.The requested authentication method (2FA) is not currently supported.
40034003The request channel (CHANNEL) is incorrect.The specified request channel is not enabled in the OTPLESS Dashboard.
59005900The (FEATURE) is not supported because it requires iOS version (supportedFrom) and above.The requested feature is only available on newer iOS versions.

Unauthorized requests:

Status CodeError CodeError MessageExplanation
401401UnAuthorized request! Please check your appId.The provided appId is incorrect or missing authentication.
4017025SMS delivery to this country is not enabled. Contact OTPLESS team to activate.The requested country is not supported for SMS delivery.

HTTP Status Code 429: Too Many Requests:


Status CodeError CodeError MessageExplanation
4297020Authentication Rate Limited reached. Please try again after some time.Too many authentication attempts have been made in a short period. The user must wait before trying again.
4297022The identity associated with this request has exceeded the allowed number of authentication requests. Please wait until the rate limit resets.The specific user or identity has hit the authentication request limit. Further attempts are blocked until the limit resets.
4297023The IP associated with this request has exceeded the allowed number of authentication requests. Please wait until the rate limit resets.The IP address sending the request has surpassed the allowed authentication attempts. The user must wait before retrying.
4297024The application has exceeded the allowed number of authentication requests. Please wait until the rate limit resets.The entire application has reached its authentication request threshold. No further requests can be made until the rate limit resets.

Network connectivity errors:

Status CodeError CodeError MessageExplanation
91009100Request TimeoutThe request took too long to complete and was aborted.
91019101Network Connection Was LostThe connection was interrupted before the request could complete.
91029102DNS Lookup FailedThe domain name could not be resolved, possibly due to network issues.
91039103Cannot Connect to ServerThe server is unreachable, possibly due to downtime or incorrect configurations.
91049104No Internet ConnectionThe device is not connected to the internet.
91059105Secure Connection Failed (SSL issue)A secure connection could not be established due to SSL/TLS issues.
91109110Otpless authentication request cancelledThe authentication request was manually canceled by the user or the system.