Skip to content

WhatsApp OTP API: Send Verification Codes from Your Website or App

HappyInAI team · Nov 12, 2026 · 3 min read

One-time passwords (OTP) protect logins, sign-ups and payments. Most websites send them by SMS, but in Bangladesh and many other countries, people open WhatsApp far more often than their SMS inbox. Sending the code on WhatsApp means customers see it faster and finish signing up.

How a WhatsApp OTP works

  1. A customer enters their phone number on your website or app.
  2. Your server asks the OTP API to send a code.
  3. The customer receives the code on WhatsApp and types it in.
  4. Your server asks the API whether the code is correct.

That's it: two calls, send and verify.

The HappyInAI OTP API

The Developer API & OTP does the hard parts for you:

  • OTP in two calls: POST /otp/send creates and sends a code; POST /otp/verify checks it.
  • Secure by default: codes expire, retries are rate-limited, and the code is never stored in plain text.
  • Test mode: test keys return the code in the response and never send, so you can build without spending a message.
  • Any connected number: send from a QR-linked number or an official API number.
POST /api/v1/otp/send
{ "to": "8801711000000" }

POST /api/v1/otp/verify
{ "phone": "8801711000000", "code": "482913" }

The full reference with examples is in your dashboard under Developers.

More than OTP

The same API sends any WhatsApp message from your systems:

  • Order updates: placed, shipped, delivered, with ready-made messages you switch on.
  • Alerts and reminders: appointments, payments due, low stock.
  • Webhooks: incoming messages, delivery and read receipts, and order events, signed and retried if your server is down.

No code? Use the WordPress plugin

Running WooCommerce? Install the HappyInAI WordPress plugin and every order sends WhatsApp updates by itself.

WhatsApp OTP and Meta's rules

On an official WhatsApp Business API number, OTP codes must use an approved authentication template, and Meta charges its authentication rate per delivered message to your own Meta account. On a QR-linked number, the code is sent as a normal message from that number.

Frequently asked questions

How much does a message cost? It comes out of your plan's monthly messages, or you pay as you go per message with no monthly fee. On official numbers Meta also bills its own fee to your Meta account.

Which number sends the message? Any connected number in your workspace. Choose one per request, or let us pick one that is online.

Can I fall back to SMS? You can: if the verify call never succeeds, send an SMS from your existing provider.

Start free and get your API key in a minute.

Put it into practice

Inbox, campaigns, AI and chatbots — free to start.

Start free

Keep reading

হোয়াটসঅ্যাপে AI অটো রিপ্লাই: বাংলায় ২৪ ঘণ্টা কাস্টমারের উত্তর দিন

রাতে বা ব্যস্ত সময়ে কাস্টমারের মেসেজের উত্তর দিতে দেরি হলে বিক্রি হাতছাড়া হয়। দেখুন কীভাবে AI আপনার নিজের তথ্য থেকে বাংলায় সঙ্গে সঙ্গে উত্তর দেয়।

Read more

WhatsApp AI Chatbot for Business: Answer Customers 24/7 in Bangla and English

How a WhatsApp AI chatbot answers customer questions day and night from your own price list and policies, in Bangla, Banglish or English, and hands the chat to your team when it should.

Read more

ফেক অর্ডার আর রিটার্ন কমান: হোয়াটসঅ্যাপে COD অর্ডার কনফার্মেশন

ক্যাশ অন ডেলিভারির ফেক অর্ডার আর রিটার্নে ডেলিভারি চার্জ নষ্ট হয়। পাঠানোর আগে হোয়াটসঅ্যাপে প্রতিটা অর্ডার কনফার্ম করে নিলে কীভাবে এটা কমে, আর Steadfast, Pathao, RedX-এ কীভাবে এক ক্লিকে বুক করবেন।

Read more
Chat now