Try searching for WooCommerce, Shopify, Abandoned Cart, or Pricing.
Connect the WALoops MCP server to an MCP-compatible coding assistant and ask it to build an OTP flow for your app. The assistant can use tools to send a WhatsApp code and verify what the user enters.
Add WhatsApp OTP login to this app using the WALoops REST API.
Send a code: POST https://app.waloops.com/api/otp/send.php
headers: X-API-Key: <WALOOPS_API_KEY env var>, X-Site-Url: <this app's public URL>, Content-Type: application/json
body: {"phone": "<international digits, e.g. 919876543210>"}
Verify: POST https://app.waloops.com/api/otp/verify.php with the same headers and {"phone": "...", "code": "<6 digits>"}; the response has "verified": true on success.
Call these only from server-side code (API route, server action or edge function), never from the browser. Keep the key in an environment variable. Codes are 6 digits, valid 5 minutes, max 5 wrong attempts, one resend per 30 seconds.
Works in Lovable, Bolt, Replit, v0, Cursor and Claude Code.
Keep requests on the server and store both environment variables in your deployment settings.
// app/api/otp/send/route.ts
export async function POST(request: Request) {
const { phone } = await request.json();
const response = await fetch("https://app.waloops.com/api/otp/send.php", {
method: "POST",
headers: {
"X-API-Key": process.env.WALOOPS_API_KEY!,
"X-Site-Url": process.env.APP_URL!,
"Content-Type": "application/json",
},
body: JSON.stringify({ phone }),
});
return Response.json(await response.json(), { status: response.status });
}
// app/api/otp/verify/route.ts
export async function POST(request: Request) {
const { phone, code } = await request.json();
const response = await fetch("https://app.waloops.com/api/otp/verify.php", {
method: "POST",
headers: {
"X-API-Key": process.env.WALOOPS_API_KEY!,
"X-Site-Url": process.env.APP_URL!,
"Content-Type": "application/json",
},
body: JSON.stringify({ phone, code }),
});
return Response.json(await response.json(), { status: response.status });
}
Deno.serve(async (request) => {
const { action, phone, code } = await request.json();
const verifying = action === "verify";
const response = await fetch(
verifying
? "https://app.waloops.com/api/otp/verify.php"
: "https://app.waloops.com/api/otp/send.php",
{
method: "POST",
headers: {
"X-API-Key": Deno.env.get("WALOOPS_API_KEY")!,
"X-Site-Url": Deno.env.get("APP_URL")!,
"Content-Type": "application/json",
},
body: JSON.stringify(verifying ? { phone, code } : { phone }),
},
);
return new Response(await response.text(), {
status: response.status,
headers: { "Content-Type": response.headers.get("Content-Type") ?? "application/json" },
});
});
$verify = false;
$endpoint = $verify
? 'https://app.waloops.com/api/otp/verify.php'
: 'https://app.waloops.com/api/otp/send.php';
$payload = $verify
? ['phone' => $phone, 'code' => $code]
: ['phone' => $phone];
$curl = curl_init($endpoint);
curl_setopt_array($curl, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-API-Key: ' . getenv('WALOOPS_API_KEY'),
'X-Site-Url: ' . getenv('APP_URL'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode($payload),
]);
$response = curl_exec($curl);
if ($response === false) {
throw new RuntimeException(curl_error($curl));
}
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);
The MCP server lets your coding assistant read the docs, send a test OTP (send_otp with site_url) and check usage while it builds. Your live app still calls the REST API above.
Connect the MCP server and start with 100 free OTPs a month.
✓ No credit card required ✓ 7-day free trial ✓ Cancel anytime