Send one-time passwords over WhatsApp instead of SMS. Higher delivery rates in every major market, no per-message carrier costs, end-to-end encrypted. 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.
WA Bridges 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.
I want to send OTP verification codes via WhatsApp using WA Bridges
instead of SMS.
My stack: [Node.js / Python / Ruby — update this]
My setup:
- WA_API_KEY: my WA Bridges 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 WA Bridges 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 WA Bridges API docs before writing:
https://wabridges.com/docs.txt
Keep it framework-agnostic — just the two functions. Add a note on
how to swap Redis for a database column if needed.