Generate OTP

This page provides you with information on Generate OTP API.

Issues OTP to the customer’s mobile number/email ID using the sessionId generated through the token/generate API.

There is a limit to the number of OTPs a customer can generate in a day. Contact the Sustenance team to increase or decrease the limit.

Resource Information

URI for Mobile App/auth/v1/otp/generate
URI for Web App/auth/v1/web/otp/generate
Rate LimitedYes
AuthenticationNo
HTTP MethodPOST
Batch SupportYes

Request URL

For mobile application:

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

For web application:

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

Request Body Parameters

{
    "identifierType":"MOBILE",
    "identifierValue":"9940000000",
    "deviceId": "32rtsdered",
    "brand": "STANDARDAPP",
    "sessionId": "D-502259d3-d4d6-4458-bc5f-b89d3d8e4c7b"
}
ParameterDatatypeDescription
identifierType*enumIdentifier used for authentication. Values: MOBILE, EMAIL, USERNAME.
identifierValue*stringValue of the specified identifierType. For example, if identifierType is MOBILE, the identifierValue is mobile number. If you want to send the OTP to WhatsApp or Zalo, you need to raise a JIRA ticket to the sustenance team to define the related configurations.
deviceId**stringUnique ID of the device from which the customer has generated the token. Required for mobile app.
brand*stringName of the brand or org for which authentication needs to be verified.
sessionId*stringSession ID generated through the v1/token/generate API.
hashstringHash value generated by the mobile application to encrypt the payload. The server-side validation is performed by matching this hash value. For information, refer to Enable API encryption.
Note: This parameter is mandatory if the API payload encryption configurations are enabled and is not applicable if the API payload encryption is not enabled.

Parameters marked with * are mandatory, and the parameter with ** is required for the mobile app.

Error

ErrorSolution
5004 - Response tamperedPayload encryption is enabled. and the defined time for the hash value is expired.
Language
Authorization
Basic
base64
:
URL
Click Try It! to start a request and see the response here!