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.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

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.

Query Params
string
enum
required

Pass any of the registered identifier type of the customer.

Allowed:
string
required

Specify the value of the specified identifierType.

string
enum
required

Source on which the customer's identifier name is registered. Use OTHERS for any other source listed here.

string

For a source with multiple accounts (such as MARTJACK, WECHAT), pass the respective account ID.

int64

Validity of the OTP (in seconds) that you want to fetch.

string
enum
required

Specify the scope of the issued OTP. Use COUPON or POINTS for the respective redemption. GENERIC for any other purpose.

Allowed:
Responses

Language
Credentials
Basic
base64
:
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json