Dashboard
Edit Article Logout

Send One Time Password


The Send One Time Password (OTP) API is used send a numeric 4-6 digit one time password to a contact's mobile phone via SMS or email inbox.

A OTP is valid for 15 minutes after being generated.

Send to mobile or email

Either a mobile number or email address parameter must be provided.

If both an email address and a mobile number are provider, the OTP will be sent to the mobile number. If only an email address is provided, the OTP will be sent to to the user's email inbox.

Behavior when recipient does not exist

When the API is called a contact is created if one does not exist. If the contact does exist, but the contact's status is deleted the OTP will fail.

The return value includes the contact's unique DailyStory ID. This DailyStory ID is used to validate the OTP received.

Important

The dsid of the contact is required to validate the one time password using the validation API.

Query Parameters
mobilestring
A valid mobile number in e.164 format. For example, a U.S. number would be +15551234567
emailstring
A valid email address.
HTTP Response Examples
200
{ "Status": true, "Message": "", "Response": { "dsid": "6bbc6d5b933b4dd38ffce5b2dc30a35f" } }
HTTP Response Parameters
Response.dsidstring
The unique id of the contact that the one time password was generated for.


How helpful was this article?

πŸ‘ or πŸ‘Ž

Related Articles