WhatsApp OTP API

Verify users via
WhatsApp.

Two API calls. One credit per OTP. Send verification codes through WhatsApp using your own business number. Higher open rates than SMS, auto-approved templates, built-in security.

Start building See how it works

Why WhatsApp for OTP?

WhatsApp messages have significantly higher engagement than SMS in markets where WhatsApp is dominant.

98%
Open rate
vs ~20% for email
<30s
Avg. read time
Codes seen instantly
1 credit
Per OTP sent
Same credits as SMS
Auto
Template approval
Auth templates approved instantly

How it works

Three steps to get started. Integration takes minutes, not days.

1

Connect WhatsApp

Sign up and connect your WhatsApp Business Account via Meta Embedded Signup. Takes under 5 minutes.

2

Enable OTP

Create an authentication template on your WABA, enable OTP from your dashboard, and grab your API key.

3

Send & Verify

Call /api/otp/send/ to send a code, /api/otp/verify/ to check it. Done.

Simple API

Two endpoints. JSON in, JSON out.

POST /api/otp/send/
Request
curl -X POST https://sms.localhost.co.zw/api/otp/send/ \
  -H "X-API-KEY: your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "phone": "+263771234567",
    "reference_id": "signup_42"
  }'
Response
{
  "ok": true,
  "request_id": "a1b2c3...",
  "expires_at": "2026-04-11T...",
  "expires_in": 300
}
POST /api/otp/verify/
Request
curl -X POST https://sms.localhost.co.zw/api/otp/verify/ \
  -H "X-API-KEY: your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "phone": "+263771234567",
    "code": "482901"
  }'
Response
{
  "ok": true,
  "verified": true,
  "request_id": "a1b2c3...",
  "reference_id": "signup_42"
}

Security built in.

🔒

6-digit codes

Cryptographically random codes generated server-side.

5-min expiry

Codes automatically expire. No stale OTPs floating around.

🚫

3 attempts max

Brute-force protection. Code is burned after 3 wrong attempts.

🕑

Rate limiting

1 OTP per phone per 60 seconds. Prevents abuse out of the box.

Simple pricing

WhatsApp OTP uses the same credit system as SMS. No separate billing, no surprises.
No monthly subscription required if you only use OTP.

1 credit
per OTP sent
Same credits as SMS — buy bundles, use for both
No monthly fees or contracts
No WhatsApp Center subscription needed for OTP-only use
Credits never expire
Verification is free — only sending costs a credit
Volume discounts on larger bundles
Create free account

Free to sign up. Buy credits when you're ready.

Built for your stack

User signup verification

Verify new users during registration. Send a WhatsApp OTP instead of email verification for higher completion rates.

Login 2FA

Add two-factor authentication to your login flow. Users receive a WhatsApp code as a second factor.

Transaction confirmation

Confirm sensitive operations like payments, transfers, or password changes with a WhatsApp verification code.

Password reset

Deliver password reset codes via WhatsApp. Faster and more reliable than email in mobile-first markets.

Booking confirmation

Send a verification code to confirm appointment bookings, ticket purchases, or delivery schedules.

Phone number change

Verify ownership when a user changes their phone number in your app. OTP to both old and new numbers.

Ready to add WhatsApp OTP?

Sign up, connect WhatsApp, get your API key. Start verifying users in minutes.

Get started free