post https://{host}/auth/v1/web/otp/generate
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 Limited | Yes |
Authentication | No |
HTTP Method | POST |
Batch Support | Yes |
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"
}
Parameter | Datatype | Description |
---|---|---|
identifierType* | enum | Identifier used for authentication. Values: MOBILE, EMAIL, USERNAME. |
identifierValue* | string | Value 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 and configure the templates. |
deviceId** | string | Unique ID of the device from which the customer has generated the token. Required for mobile app. |
brand* | string | Name of the brand or org for which authentication needs to be verified. |
sessionId* | string | Session ID generated through the v1/token/generate API. |
hash | string | Hash 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
Error | Solution |
---|---|
5004 - Response tampered | Payload encryption is enabled. and the defined time for the hash value is expired. |