Get OTP

Allows fetching recent OTP issued to a customer. For now, OTP is issued for redeeming points/coupons and customer registration. If there is more than one valid OTP available for the customer, this API fetches the recently issued OTP.

Path parameters

ParameterDatatypeDescription
identifierNameenumPass any of the registered identifier type of the customer. Values: mobile, email, external_id, wechat.
identifierValuestringSpecify the value of the specified identifierType
sourceenumSource in which the customer is registered.
accountIdstringAccount ID of the source such as WeChat and Facebook. Required for sources with multiple accounts.
thresholdlongSpecify the validity of the OTP (in seconds) that you want to fetch.
scopeenumSpecify the scope of the issued OTP. Values: COUPON (for coupon redemption), POINTS (for points redemption), REGISTRATION, USERGROUP, SUBSCRIPTION, GENERIC (for other purposes).

Response parameters

ParameterDatatypeDescription
orgIdLongUnique ID of the org (the current org) from which the OTP is generated.
userIdLongUnique ID of the customer to whom the OTP is sent.
codeStringThe OTP, or validation code, sent to the customer.
validUptoDate-TimeThe validity of the OTP in YYYY:MM:DDTHH:MM:SS+[Time Zone]

📘

Note

You can generate up to 10 OTPs per user per day.

Language
Authorization
Basic
base64
:
URL
Click Try It! to start a request and see the response here!