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 $ is incorrect.The specified request channel is not enabled in the OTPLESS Dashboard.

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.

Passkey Error Codes for Android

These are the types of errors that may arise during passkey authentication:

Error messages and types may depend upon the device manufacturer. Hence if an unknown error type is encountered, errorCode 500 is provided.

Status CodeError CodeError MessageExplanation
5009002TYPE_INTERRUPTEDThe operation was interrupted before completion.
5009003TYPE_NO_CREDENTIALNo credentials are available for the requested operation.
5009004TYPE_UNKNOWNAn unknown issue was encountered during the operation.
5009005TYPE_USER_CANCELEDThe user canceled the authentication process.
5009006TYPE_NO_CREATE_OPTIONSNo credential creation options are available for this request.
5009007TYPE_NOT_ALLOWED_ERRORThe operation is not allowed due to security restrictions.
5009008TYPE_TIMEOUT_ERRORThe operation timed out before completion.
5009009TYPE_CONSTRAINT_ERRORA constraint was violated during the authentication process.
500500UNKNOWN ERRORAn unspecified error occurred during the operation.

Network connectivity errors

Status CodeError CodeError MessageExplanation
91009100Socket timeout exceptionThe request failed due to a socket timeout exception.
91049104IO Exception occurredThe request failed due to an IOException.
91039103Unknown Host ExceptionThe request failed because the host is unknown.