Send OTP

Send a One-Time Password (OTP) via WhatsApp.

GET
https://api.wawp.net/v2/auth/otp/send?access_token=YOUR_TOKEN&chatId=201XXXXXXXXX&cooldown=60&footer=Secured+by+Wawp&include_id=false&instance_id=YOUR_INSTANCE&lang=ar&message=Your+code+for+%7B%7Bsite_link%7D%7D+is+%7B%7Botp%7D%7D&site_link=https%3A%2F%2Fsitelink.com

Authentication Required

Login to swap the placeholders with your real Instance ID and Access Token.

Log In
Test /v2/auth/otp/send endpoint
GETPOST

No query parameters required

This endpoint doesn't expect data in the URL.

Seamless Authentication: The Wawp Authenticator Strategy

Transform your platform's user experience by replacing expensive SMS logic or slow Email verification with instant, secure WhatsApp OTPs. This endpoint powers a global-ready Identity Management flow.

Global Multi-Language Support 🌍

Our system supports 26+ global languages natively. When you specify a 'lang' parameter, the system automatically selects one of 5 different message templates for that language to ensure variety and security.

CodeLanguageCodeLanguage
enEnglish (Default)arArabic
frFrenchesSpanish
ptPortuguesedeGerman
itItaliantrTurkish
idIndonesianhiHindi
ruRussianjaJapanese
koKoreanzhChinese
nlDutchplPolish
viVietnamesethThai
msMalayfaPersian
urUrdubnBengali
elGreekroRomanian
svSwedishukUkrainian

🚀 Additional Context (Performance & Customization)

  • Universal Auth: Accepts credentials via Headers (Authorization: Bearer), JSON Body, or Query parameters.
  • Custom Message Templates: Pass a custom 'message' parameter using placeholders {{otp}} (for the 6-digit code) and {{site_link}} (for your site URL).
  • Toggleable Unique ID: Control whether to append ID: XXXX at the end of the message via 'include_id' (true or false).
  • Configurable Cooldown: Set a custom resend delay via 'cooldown' parameter in seconds (Range: 10 to 600s, Default: 30s).
  • Subscription Aware: Systems automatically detect your plan. Unlimited users bypass local rate-limiting queues for immediate dispatch.
  • Validations: Automatically formats and validates phone numbers before dispatching.

Anti-Ban & Deliverability Engine 🛡️

We utilize advanced heuristics to protect your WhatsApp numbers from being flagged:

  1. Template Rotation & Custom Text: Supports template rotation or exact custom template formatting.
  2. Mathematical Uniqueness: Option to append unique transaction IDs (ID: XXXX) to prevent hash-matching by WhatsApp.
  3. Smart Delays: Messages are queued with random millisecond delays (3-8 seconds) to mimic human typing patterns.

Request Parameters

Configure the parameters required to interact with this endpoint. All query and body arguments are listed below with their details.

URL Parameters

Passed in the URL query string
string

Your unique WhatsApp Instance ID

Example:
string

Your API Access Token

Example:
string

The recipient's valid phone number (International format).

Example:
string

Language code (Default: en).

Example:
string

Custom OTP message template. Supports {{otp}} and {{site_link}} placeholders.

Example:
string

Website URL to replace {{site_link}} in the message template.

Example:
boolean

Toggle whether to include the random unique message ID suffix (Default: true).

Example:
number

Resend cooldown period in seconds (Default: 30, Min: 10, Max: 600).

Example:
string

Optional custom text to append to the message.

Example:

Build with AI using Wawp MCP

MCP READY

Connect Wawp API directly to Cursor, Windsurf, or Claude Desktop. Let AI write, test, and execute your WhatsApp integration code automatically!

How to Connect

Request Samples

Use these ready-to-go code snippets to integrate our API into your project quickly and efficiently. Choose your preferred language and library.

1const baseUrl = "https://api.wawp.net";
2const endpoint = "/v2/auth/otp/send";
3const params = new URLSearchParams({
4 "instance_id": "YOUR_INSTANCE",
5 "access_token": "YOUR_TOKEN",
6 "chatId": "201XXXXXXXXX",
7 "lang": "ar",
8 "message": "Your code for {{site_link}} is {{otp}}",
9 "site_link": "https://sitelink.com",
10 "include_id": "false",
11 "cooldown": "60",
12 "footer": "Secured by Wawp"
13}).toString();
14
15
16fetch(`${baseUrl}${endpoint}${params ? '?' + params : ''}`, {
17 method: "GET",
18 headers: { "Content-Type": "application/json" },
19
20})
21 .then(async (response) => {
22 if (response.ok) {
23 const data = await response.json();
24 console.log("Success:", data);
25 return data;
26 }
27
28 // Error Handling
29 if (response.status === 401) {
30 console.error("Error 401: Unauthorized - Invalid access_token");
31 }
32 if (response.status === 429) {
33 console.error("Error 429: Rate Limit Exceeded - Recipient protection");
34 }
35
36 const errorText = await response.text();
37 console.error(`Error ${response.status}: ${errorText}`);
38 })
39 .catch((error) => console.error("Network Error:", error));
Interactive Samples
Ln 39, Col 1javascript

Expected Responses

Explore all possible responses and outcomes from the server. We have documented each status code with data examples to make success and error handling easier.

OTP sent successfully
application/json
string *
string *
number *
string *

Example

{
"code": "success",
"message": "Verification code sent successfully",
"expires_in": 300,
"job_id": "send_123_456"
}
Unauthorized - Invalid access_token
Rate Limit Exceeded - Recipient protection
Previous TopicGet QR Image
Next TopicVerify OTP

Command Palette

Search for a command to run...

OFFER ENDS SOON

Extra 30% OFF All Plans

Use this exclusive promo code at checkout to enjoy an extra 30% discount on top of current sales!

BOOST30