Validate OTP

Validates the OTP generated through the /otp/generate API.

Resource Information

URI for Mobile Appauth/v1/otp/validate
URI for Web Appauth/v1/web/otp/validate
Rate Limited?Yes
AuthenticationNo
HTTP MethodPOST
Batch SupportYes

Request URL

For mobile application:

http://{ae-host}/auth/v1/otp/validate

For web application:

http://{ae-host}/auth/v1/web/otp/validate

Request Body Parameters

ParameterDatatypeDescription
identifierType*enumIdentifier used to generate OTP. Values: MOBILE, EMAIL, USERNAME.
identifierValue*stringValue of the specified identifierType. For example, if identifierType is MOBILE, the identifierValue is mobile number.
deviceId**stringUnique ID of the device associated with the OTP. Not applicable for web application.
brand*stringName of the brand or org associated with the OTP.
sessionId*stringSession ID generated through the v1/token/generate API.
otp*longValidation code received by the customer (either to the mobile number or email ID provided).
Note: You can configure maximum retries as well as account locking after several defined unsuccessful attempts to enter the correct OTP.

Parameters marked with * are mandatory.

Response parameters

ParameterDescription
statusObject containing status information
- successBoolean indicating the success status
- codeNumber indicating the status code (e.g., 200 for success)
- messageString providing a message related to the status
authObject containing authentication information
- tokenString representing the authentication token. By default, the token is valid for 15 minutes.
- keyString representing the authentication key. This key has no validity and can be used to regenerate the authentication token. It is recommended to set an expiry of the key to avoid unauthorized usage. For more information, refer to the section Configuring validity for the key.
userObject containing user information
- appRegisteredBoolean indicating if the user is registered in the app
- sessionIdValue representing the user's session ID
- roleString indicating the user's role (e.g., "USER")
- userRegisteredForPasswordBoolean indicating if the user is registered for a password
Language
Credentials
Basic
base64
:
URL
Click Try It! to start a request and see the response here!