How to Add WhatsApp OTP Verification to Your App or Store
Why WhatsApp for verification codes?
Most customers in the region open WhatsApp far more often than SMS, and the message arrives under your verified business name instead of an unknown number. That is why sending one-time passwords (OTP) over WhatsApp has become a common choice for sign-in, order confirmation and password recovery. For the bigger picture, read how WhatsApp OTP works.
The integration in two calls
- Send the code: your system calls
/api/v1/otp/sendwith the customer's number and the purpose of the code (for example, sign-in). The platform generates the code and sends it from your company's WhatsApp number. - Verify the code: when the customer types it in, your system calls
/api/v1/otp/verifyand immediately knows whether it is correct.
You never store the code yourself or track its expiry: the platform keeps it hashed for a short time and limits the number of attempts.
What you need to start
- A WhatsApp number connected to your company in the Communication Hub.
- An API key from the Messaging API center in your account.
- The full request and response reference on the OTP API documentation page.
During the 14-day free trial the API works with a daily limit, and you can request a higher limit from inside your account when you need it.
Security best practices
- Keep codes valid for a few minutes only, and do not reveal a detailed reason when a code is wrong.
- Rate-limit requests per number and per IP address to prevent abuse and unnecessary sending costs.
- Keep the API key in server environment variables, never in app or front-end code.
- Use the right purpose for each action so a sign-in code can never confirm a payment, for example.
After verification
Once the customer is verified you can keep the conversation on the same number: order confirmation, shipping updates or a welcome message, all through approved WhatsApp message templates. Try Zervixo free and send your first code within minutes.
Want to run your business more efficiently?
Try Zervixo free for 14 days — no credit card required.
Start your free trial