OTP Auth Request

Description

Summary: Initiates a one-time password (OTP) authentication request via the TextPeak Streams API. Details: This endpoint triggers an OTP delivery to a specified recipient phone number. The OTP is sent using a predefined event template (identified by the event field) and a designated sender. This is designed for authentication flows such as login verification, account confirmation, or two-factor authentication (2FA). The platform handles OTP generation and delivery; the caller only needs to specify the recipient, sender, and the event that defines the OTP template and delivery channel. Authentication is performed via a stream token passed in the Authorization header.

Authentication & Scopes

Authentication is handled via a stream token provided in the Authorization header. No OAuth scopes are defined; access is granted or denied based on the validity of the token.

MethodDetails
Stream TokenPass your token directly in the Authorization header value (not as a Bearer token).

Headers

HeaderRequiredDescription
AuthorizationYesThe stream token that verifies your access to the API.
Content-TypeYesMust be set to application/json. The API only accepts JSON-formatted request bodies.

Parameters

This endpoint does not use path or query parameters.

Request Body

The request body is a flat JSON object specifying the recipient, sender, and the OTP event to trigger.

FieldTypeRequiredDescription
recipient_phonestringYesThe phone number of the recipient who will receive the OTP, in international format (e.g., "972507445456").
senderstringYesThe sender's identifier displayed to the recipient (e.g., "OTP").
eventstringYesThe name of the predefined OTP event template to trigger. Defines the message format and delivery channel (e.g., "login_commpeak").

Examples

This endpoint has a saved example demonstrating usage:

  • OTP Auth Request — Triggering an OTP delivery for a login authentication event.
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
string
string
string
string
template_variables
object
Response

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