How to Send OTP and Login Codes on WhatsApp (Authentication Templates)
Quick answer: OTPs on WhatsApp use authentication templates approved by Meta. They are delivered fast, support a one-tap copy code button and are billed as authentication messages.
How it works
Your app or website calls the API with an approved authentication template and the code. The customer receives it on WhatsApp and can copy it with one tap.
Setup steps
- Create an authentication template in your dashboard.
- Wait for Meta's approval.
- Connect your login system through the REST API (Business plan and above).
- Send the code, set a short expiry and verify it on your server.
Good practice
- Keep codes short-lived and single-use.
- Rate-limit attempts to prevent abuse.
- Do not add promotional text to OTP messages.
- Check pricing: authentication messages are charged per delivered message.
Frequently asked questions
Can I send OTPs to customers who never messaged me?
You still need the customer's consent to be contacted on WhatsApp. Include it in your sign-up or login terms.
Meta changes its rules and prices from time to time. Always check Meta's official documentation for the latest details.
Related guides
WWhatsApp Message TemplatesTemplates are pre-approved messages you use to start a conversation with a customer or to reach them outsideā¦WWhatsApp Broadcast CampaignsBroadcasts send an approved template to many opted-in contacts at once.WWhatsApp Opt-In RulesMeta requires customers to opt in before you send business-initiated messages.WWhatsApp Messaging Limits and Quality Rating ExplainedYour messaging limit caps how many unique customers you can start conversations with in 24 hours.
