Guides
WhatsApp OTP and authentication messages: templates and cost
WhatsApp OTP messages use authentication templates whose wording Meta fixes: the code, an optional security note and expiry, and a copy-code or autofill button. Each costs ₹0.115 to an Indian number. Keep SMS as a fallback for customers without WhatsApp.
How authentication templates differ from every other category, what the rules allow in them, and how to handle a code that does not arrive.
Start free trial Discuss your setupAuthentication is its own category, deliberately
A WhatsApp OTP message is not a utility message with a number in it. WhatsApp treats authentication as a separate template category with its own rules, its own structure and its own price, and the separation is intentional: a code that lets someone into an account is a different kind of message from a dispatch notice, and it is held to different standards.
The practical effect is that you have less freedom here than anywhere else in the product, and that is the point. An authentication template is deliberately constrained so that a passcode message cannot be used as a vehicle for anything else. You cannot add a greeting about your new range, and you should not want to.
Meta documents the category, its permitted structure and the button behaviour it supports: read the official authentication template documentation before you design a flow around it, because this is the area where platform behaviour differs most between operating systems and markets.
What goes in the message, and what must not
The body carries the code and almost nothing else. Resist every instinct to make it friendlier. No offer, no cross-sell, no "while you are here" — a passcode message with marketing attached is both a policy problem and a security one, because it trains customers to read codes as promotional noise.
Say what the code is for, in plain words, and say how long it lasts. A customer who receives a code with no context cannot tell a legitimate login attempt from an attack on their account, and the expiry is what lets them judge whether a code they did not request is still dangerous.
Never include the code in an ordinary link. A code the customer taps is a code that has travelled through whatever opens that link. The platform provides purpose-built button behaviour for copying or filling a code precisely so you do not have to invent a mechanism, and an invented one is almost always weaker.
Copy, autofill and the differences between phones
The category supports buttons designed for codes: a copy action that puts the code on the clipboard, and on supported setups a fill action that hands the code to your app directly. The second is much better for the customer and much more work for you, because it requires configuration on the app side and only works where that configuration applies.
This is where teams get caught. A flow tested on one Android handset with the app installed behaves differently on a browser-based login, on iOS, or for a customer who received the code but does not have your app at all. Design for the weakest case first — a customer reading a code off a screen and typing it — and treat autofill as an improvement on top. If you are building the app itself, see mobile app development.
Test the fallbacks explicitly. What does a customer see if the fill action does nothing? If the answer is "nothing happens and they are stuck", the flow needs a visible code they can read and a way to request another one.
When a code does not arrive
A WhatsApp OTP message fails for mundane reasons: the number was typed wrong, the customer has no WhatsApp on that number, the message was sent to a number that has blocked you, the device is offline. Your login screen has to handle all of them without leaving the customer stranded, and without telling an attacker which numbers exist on your platform.
Build three things before launch. A resend, rate-limited, that makes clear a new code invalidates the old one. An alternative route — SMS, email, a support path — because a single channel for account access is a single point of failure. And a clear message when delivery genuinely failed, distinct from a code that was delivered and simply not entered yet.
On your side, make a failed authentication send findable. An administrator should be able to look at a customer's number and see that the code was attempted, delivered or rejected, with a timestamp. Our API and webhooks page covers the signed delivery events that make this traceable rather than guessed.
Rate limits, abuse and the bill
An authentication endpoint is the part of your product most likely to be attacked for fun. Somebody will point a script at it and request thousands of codes to numbers that are not theirs, and every one of those is a message you pay for and a stranger you annoyed.
Rate-limit by number and by source before you launch, not after the first invoice. A sensible floor: a small number of codes per number per hour, a longer cooldown after repeated failures, and an alert when the overall rate jumps. None of that is WhatsApp-specific; it is just the thing nobody does until it costs money.
Watch the spend as its own line rather than inside a general messaging total. Authentication volume should track your login attempts. If it starts tracking something else, you are either being abused or retrying far more than you think. Our analytics and the charges reference are where that becomes visible.
Consent, and why it works differently here
Authentication sits in a different place from marketing on consent, because the customer initiated the action: they are trying to log in, and the code is the completion of a request they just made. That is not a general permission to message them, and it does not transfer to anything else.
So keep the authentication number and the marketing number straight in your own head, even when they are the same number in practice. A customer who receives a login code has not joined a promotional list, and sending them an offer on that basis is the quickest way to turn a security message into a complaint.
If you genuinely want to message those customers about other things, ask separately and record the answer. The opt-in rules guide covers what a recordable consent looks like, and why a checkbox buried in terms is not one.
A worked flow to test end to end
Start at the login screen with a number you control. Request a code. Note the time, read the message on the phone, and check the wording tells you what the code is for and when it expires. Enter it successfully. That is the happy path, and it is the one everybody tests.
Now test the ugly ones. Request a code and wait past expiry, then try it — you should be told clearly that it expired, not simply that it is wrong. Request two codes in quick succession and confirm the first stops working. Request several more and confirm your rate limit engages with a message a real person can understand.
Finally, test the number that cannot receive it. Use a number with no WhatsApp account and confirm your product offers another route rather than looping. Write down what happened at each step, because this is the flow you will be debugging under pressure at some point, and your notes from a calm afternoon will be worth a great deal then.
Send an authentication code through the Autochatix API
The public API includes POST /api/v1/messages/auth-otp for sending a code supplied by your application through an existing WhatsApp authentication template. The API key needs the messages.send scope, the selected WhatsApp channel must be configured, and the template must already exist on that channel with the AUTHENTICATION category.
POST /api/v1/messages/auth-otp
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
{
"to": "+15551234567",
"templateName": "login_code",
"code": "482913",
"language": "en_US",
"channelId": "YOUR_CHANNEL_ID"
}
Your application must generate the code, bind it to the correct sign-in or transaction, expire it, limit attempts and verify the code. This endpoint sends the supplied code; it does not provide an identity-verification system, password-reset workflow, SMS fallback, fraud review or delivery guarantee. Check the message status webhook after the API accepts the request. See API scopes and delivery events and custom API development scope.
Before you make WhatsApp your only code channel
It is tempting, once this works, to retire SMS. Think carefully. WhatsApp requires the customer to have the app, an account on that number, and connectivity. Those are usually true in India and frequently not true for a traveller, a new device, or someone who has just been locked out of the phone they are trying to recover.
The safer architecture treats WhatsApp as the preferred channel and keeps a fallback for the cases it cannot serve. That costs a little more and removes a class of support ticket that is miserable for everyone: a customer who cannot get into their account and cannot get a code either.
Review the decision with real numbers after a month. If the fallback is used by a measurable share of attempts, it has earned its place. If it is genuinely unused, you will know that from data rather than from an assumption, which is the only sound basis for removing a safety net.
Product walkthrough
See this part of the workflow






OTP verification, autofill, template approval and SMS fallback
The WhatsApp message carries a code; your application owns authentication, identity checks, recovery and fallback behavior.
An OTP verification developer service needs more than a send endpoint. For a secure signup verification workflow or transaction verification automation, the server should create a short-lived, single-purpose code, bind it to the exact sign-in or transaction, rate-limit issuance and attempts, compare the submitted code safely, and invalidate it after success or expiry.
A one-tap autofill OTP implementation or zero-tap flow depends on an eligible authentication template button, platform-specific app integration and Meta/device requirements. Template approval is controlled by Meta and can be rejected or reclassified; it is not a service guarantee. Keep a manual copy-and-type path and test Android, iOS, web login, unsupported devices, wrong numbers and delayed delivery.
An OTP fallback to SMS must not let an attacker bypass stronger checks or enumerate accounts. Decide in your own identity system when fallback appears, how often it can be requested, and how both channels share one attempt limit. A WhatsApp chatbot alone is not proof of identity, a KYC decision, or a safe account-recovery check.
Autochatix's endpoint can send a supplied code using an existing approved AUTHENTICATION template, but it does not verify the code, provide a template approval service, provide one-tap app integration, or deliver SMS fallback. See Meta's message-template reference for current authentication button options. Confirm availability for your WABA and target client platforms.
Frequently asked questions
An authentication (OTP) template to an Indian number costs ₹0.115 from Meta (Meta’s India rate card, effective 1 October 2026). A business based outside India sending OTPs to Indian numbers pays the authentication-international rate of ₹2.4971. Above 750,000 authentication messages a month, Meta’s volume tiers lower the rate. Your provider’s fee is added on top.
No. Meta charges every delivered authentication template, outside the free entry point window. A provider may advertise free credits, but the messages themselves are billed by Meta. For small volumes the cost is low: 1,000 OTPs to India cost ₹115 from Meta before any fee and tax.
No. The authentication category is deliberately constrained. Adding promotional content risks the template and undermines the security purpose of the message.
No. Use the platform's own copy or fill button behaviour. A code inside an ordinary link travels through whatever opens that link.
No. It depends on the operating system, your app configuration and the market. Design for a customer reading and typing the code, and treat autofill as an enhancement.
It can, but it is risky. A customer needs the app, an account on that number and connectivity, which fails exactly when someone is recovering a lost device. Keep a fallback.