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 Generate

Prev Next
Post
/otp/generate

Used to create and send one-time passwords (OTPs) to users for secure authentication.

Body parameters
Send OTP via SMS using a user ID
{
  "apptoken": "YOUR_APPTOKEN",
  "service_id": "YOUR_SERVICE_ID",
  "send_by": "id",
  "id": "USER_ID",
  "id_type": "user_id"
}
object
apptoken
string Required

Your App token

service_id
string Required

Represents the integration ID. The integration associated with this ID must be active

id
string Required

Required if send_by is set to id. Identifier for the user profile.

id_type
string Required

Required if send_by is set to id. Type of the identifier provided in the id field.

send_by
string Required

Determines how the profile is identified for OTP delivery. Options: id or contact.

mobile_number
string Required

Required if send_by is set to contact. The mobile number to receive the OTP.

Responses
200

200

Result
{
  "success": "True",
  "code": "200",
  "request_id": "123e4567-e89b-12d3-a456-426614174000",
  "status": "success"
}
object
success
boolean
Defaulttrue
ExampleTrue
code
integer
Default0
Example200
request_id
string
Example123e4567-e89b-12d3-a456-426614174000
status
string
Examplesuccess
400

400

Result
{
  "success": "False",
  "code": "400",
  "status": "failure",
  "error": "Invalid mobile number format."
}
object
success
boolean
Defaulttrue
ExampleFalse
code
integer
Default0
Example400
status
string
Examplefailure
error
string
ExampleInvalid mobile number format.