WABridges
← All guides
Guide

Verification codes that
actually arrive.

SMS OTPs get lost to carrier filtering and routing gaps — and cost you per message. WhatsApp codes arrive in seconds over data, in every major market, with no carrier fees. One POST per code.

SMS OTP delivery fails more than you'd think — carrier filtering, international routing gaps, and SIM-swap attacks make SMS a weak link in your auth flow. WhatsApp has near-universal penetration in most markets and delivers instantly over data, not the carrier network.

WABridges lets you send verification codes to any WhatsApp number from your backend in one API call. No template pre-approval, no per-message fee, no carrier relationship required.

How it works

1
Provision a verification bridge
Create a bridge with a POST request and pair it with a dedicated WhatsApp number. Takes under 60 seconds.
2
Generate a code in your backend
Create a time-limited OTP (6 digits, 10-minute expiry is standard). Store it server-side keyed to the user's session or phone number.
3
Send via WABridges
POST the code to the WABridges send endpoint with the user's phone number. The message arrives in seconds.
4
Verify on submit
User enters the code in your app. Your backend checks it against the stored value and expiry. Mark verified and clear the code.

What you can build

🔐
Login verification
  • Passwordless sign-in
  • 2FA second factor
  • New device confirmation
  • Suspicious login challenge
📱
Phone number confirmation
  • Onboarding phone verify
  • Account recovery
  • Number change confirmation
  • Payment method auth
🛒
Transaction auth
  • High-value checkout confirm
  • Wire transfer approval
  • Account deletion confirm
  • API key rotation
🌍
International markets
  • LATAM where WhatsApp > SMS
  • India, Brazil, Indonesia
  • No carrier relationship needed
  • Same API for every country

Paste into Claude, ChatGPT, or any AI assistant

Copy this prompt → paste into any AI assistant → get working code in your language.
I want to send OTP verification codes via WhatsApp using WABridges
instead of SMS.

My stack: [Node.js / Python / Ruby — update this]
My setup:
- WA_API_KEY: my WABridges API key
- Bridge customer_ref: "verify"
- I use Redis for ephemeral key storage (or tell me an alternative)

I need:
1. A sendOtp(phoneNumber) function that:
   - Generates a 6-digit code
   - Stores it in Redis with a 10-minute TTL, keyed by phone number
   - Sends it via WABridges with a friendly message like:
     "Your verification code is: 483920. Expires in 10 minutes."
2. A verifyOtp(phoneNumber, code) function that:
   - Looks up the stored code
   - Returns true/false and deletes the key on success
   - Rate-limits to 5 attempts (decrement a counter, block on 0)

Please read the WABridges API docs before writing:
https://wabridges.com/llms-full.txt

Keep it framework-agnostic — just the two functions. Add a note on
how to swap Redis for a database column if needed.

Why WABridges

Related guides