OTP Execute

Send your own OTPs to your users with Xtremepush

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 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.

Request Body

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:

Specify Recipient using User ID

{
    "id": "123",
    "id_type": "user_id",
    "service_id": "xyz123",
    "send_by": "id",
    "otp_code":"9876",
    "channel": "sms"
}

Specify Recipient using Mobile Number

{
    "service_id": "xyz123",
    "mobile_number": "123456789",
    "send_by": "contact",
    "otp_code":"9876",
    "channel": "sms"
}

Try it Yourself

Enter values in the body parameters below to see the expected API request and response format:

Language
Click Try It! to start a request and see the response here!