OTP Verify Request

Description

Summary: Verifies a one-time password (OTP) code submitted by a user via the TextPeak Streams API.
Details: This endpoint validates an OTP code against the phone number it was originally sent to. It is the second step in the OTP authentication flow — after the OTP has been delivered via the /streams/otp/auth endpoint, the recipient submits the code they received, and this endpoint confirms whether it is valid. Use this to complete authentication flows such as login verification, account confirmation, or two-factor authentication (2FA). 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 containing the phone number and the OTP code to verify.

FieldTypeRequiredDescription
phone_numberstringYesThe phone number the OTP was originally sent to, in international format (e.g., "972507445456"). Must match the number used in the corresponding /streams/otp/auth request.
otp_codestringYesThe one-time password code submitted by the user for verification (e.g., "482910").

Examples

This endpoint has a saved example demonstrating usage:

  • OTP Verify Request — Verifying an OTP code against the recipient's phone number.
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
string
string
Response

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