Documentation Index

Fetch the complete documentation index at: https://docs.xtremepush.com/llms.txt

Use this file to discover all available pages before exploring further.

OTP Execute

Prev Next
Post
/otp/execute

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.

Body parameters
Specify Recipient using User ID
{
  "apptoken": "YOUR_APPTOKEN",
  "service_id": "YOUR_SERVICE_ID",
  "send_by": "id",
  "id": "USER_ID",
  "id_type": "user_id",
  "otp_code": "123456",
  "channel": "sms"
}
Specify Recipient using Mobile Number
{
  "apptoken": "YOUR_APPTOKEN",
  "service_id": "YOUR_SERVICE_ID",
  "send_by": "contact",
  "mobile_number": "+353850123456",
  "otp_code": "123456",
  "channel": "sms"
}
object
apptoken
string Required

Your App token

id
string Required

Identifier of the user profile. Required only if you're specifying the recipient using customer, profile, or user ID

id_type
string Required

Specify if the ID is a user_id, profile_id, or customer_id

service_id
string Required

Your OTP integration ID. The associated OTP integration must be active.

mobile_number
string Required

The mobile number to which the OTP must be delivered. Required only if you're specifying the recipient using a mobile number.

send_by
string Required

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

otp_code
string Required

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

channel
string Required

Specify sms as the delivery channel for your OTP

Responses
200

200

Result
{
  "requestID": "",
  "code": "Success"
}
object
requestID
string
Example<otp_id>
code
string
ExampleSuccess
400

400

401

401

Result
{
  "success": "False",
  "code": "401",
  "message": "Unauthorized"
}
object
success
boolean
Defaulttrue
ExampleFalse
code
integer
Default0
Example401
message
string
ExampleUnauthorized