Verify OTP

Verify a One-Time Password (OTP) and optionally add user to a list.

GET
https://api.wawp.net/v2/auth/otp/verify?chatId=201XXXXXXXXX&code=123456&list_id=45&instance_id=YOUR_INSTANCE&access_token=YOUR_TOKEN

Authentication Required

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

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

No query parameters required

This endpoint doesn't expect data in the URL.

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

Example:
string

The 6-digit verification code.

Example:
number

Optional list ID to automatically add the user to.

Example:

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/verify";
3const params = new URLSearchParams({
4 "instance_id": "YOUR_INSTANCE",
5 "access_token": "YOUR_TOKEN",
6 "chatId": "201XXXXXXXXX",
7 "code": "123456",
8 "list_id": "45"
9}).toString();
10
11
12fetch(`${baseUrl}${endpoint}${params ? '?' + params : ''}`, {
13 method: "GET",
14 headers: { "Content-Type": "application/json" },
15
16})
17 .then(async (response) => {
18 if (response.ok) {
19 const data = await response.json();
20 console.log("Success:", data);
21 return data;
22 }
23
24 // Error Handling
25 if (response.status === 401) {
26 console.error("Error 401: Unauthorized - Invalid access_token");
27 }
28 if (response.status === 429) {
29 console.error("Error 429: Rate Limit Exceeded - Brute force protection");
30 }
31
32 const errorText = await response.text();
33 console.error(`Error ${response.status}: ${errorText}`);
34 })
35 .catch((error) => console.error("Network Error:", error));
Interactive Samples
Ln 35, 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.

Verification successful.
application/json
string *
string *
string *
string *

Example

{
"code": "success",
"message": "Verification successful",
"token": "base64_encoded_proof",
"list_message": "Number added to list 45 successfully"
}
Unauthorized - Invalid access_token
Rate Limit Exceeded - Brute force protection
Previous TopicSend OTP
Next TopicSend Auth List

Command Palette

Search for a command to run...