Used to send pre-generated one-time passwords (OTPs) to your users.
Send pre-generated one-time passwords (OTP) to your customers using Xtremepush's SMS delivery functionality. The OTP is placed in a dedicated queue to ensure it is sent to your user immediately. You can send one OTP to one recipient per API request.
Each successful OTP request returns a unique OTP ID in the API response.
For each request, a new record is created in the History tab of your OTP integration, which logs the delivery status, request date, and other relevant details.
The request body must be a JSON object containing the pre-generated OTP code and the user identification details. The structure of the request body differs depending on whether you identify the user by their ID (customer, profile or user ID) or their mobile number as shown in the examples below.
{
"apptoken": "YOUR_APPTOKEN",
"service_id": "YOUR_SERVICE_ID",
"send_by": "id",
"id": "USER_ID",
"id_type": "user_id",
"otp_code": "123456",
"channel": "sms"
}{
"apptoken": "YOUR_APPTOKEN",
"service_id": "YOUR_SERVICE_ID",
"send_by": "contact",
"mobile_number": "+353850123456",
"otp_code": "123456",
"channel": "sms"
}Your App token
Identifier of the user profile. Required only if you're specifying the recipient using customer, profile, or user ID
Specify if the ID is a user_id, profile_id, or customer_id
Your OTP integration ID. The associated OTP integration must be active.
The mobile number to which the OTP must be delivered. Required only if you're specifying the recipient using a mobile number.
Determines how the profile is identified for OTP delivery. Choose id if the profile is identified using an ID, or contact if using a phone number
The pre-generated OTP code you want to send to your user. The OTP must be alphanumeric and between 4 to 10 characters in length
Specify sms as the delivery channel for your OTP
200
{
"requestID": "",
"code": "Success"
} 400
401
{
"success": "False",
"code": "401",
"message": "Unauthorized"
}