Published in Guides

How to send OTPs on WhatsApp (authentication templates explained)

By Lyle Timotheus · 7 min read

Share this post

To send OTPs on WhatsApp, you use an authentication template on the WhatsApp Business Platform (Cloud API): Meta's fixed text " is your verification code", an optional security line and expiry warning, and a copy code or one-tap autofill button, or zero-tap on Android. Your login system generates the code and calls the API, and Meta charges per delivered message at the authentication rate.

This guide explains how authentication templates work, Meta's rules, the three button types, a step-by-step flow for your developers, the limits and costs that catch teams out, and how WhatsApp OTPs sit alongside your customer conversations.

Why businesses send OTPs on WhatsApp

One-time passcodes confirm a phone number at sign-up, protect logins, approve a payment or verify an order. SMS has been the default for years. WhatsApp is worth adding because the message shows your business name and profile, it arrives over data, and the button can fill the code in for the customer.

It's rarely a full replacement. WhatsApp needs data and an installed app, so most teams keep SMS as a fallback when a WhatsApp message isn't delivered. Our WhatsApp vs SMS guide covers how to set up that split.

The rules for authentication templates

Meta is strict about OTPs, and the rules are short enough to keep on one screen. According to Meta's template categorisation and authentication template docs:

  • Only authentication templates may carry a one-time passcode. You can't send codes in a utility or marketing template.
  • The text is fixed. The body reads " is your verification code." You can't rewrite it.
  • Two optional add-ons: a security line ("For your security, do not share this code.") and an expiry warning ("This code expires in minutes."), with an expiry of 1 to 90 minutes.
  • No URLs, media or emojis in the content or parameters.
  • Codes up to 15 characters.
  • A button is required (copy code or one-tap), except for zero-tap.
  • Primary device only. On the Cloud API, authentication messages are delivered only to the customer's main phone. Linked devices see a prompt to check their phone.

Meta's time-to-live docs add one more useful control. An authentication template that isn't delivered within its time-to-live is dropped instead of arriving late. The default is 10 minutes, and you can set anything from 30 seconds to 15 minutes. Match it to how long your code is valid, so nobody receives a dead code an hour later.

Copy code, one-tap and zero-tap compared

Button typeWhat the customer doesWhere it worksWhat your developers need
Copy codeTaps the button, then pastes the code into your app or websiteAll devicesThe simplest setup; a good default for websites
One-tap autofillTaps the button and WhatsApp opens your app with the code filled inAndroid app. Meta says iOS 26 and later offers the code as a keyboard suggestionYour Android package name and app signing key hash, and a handshake before sending
Zero-tapNothing. Your app receives the code automaticallyAndroid onlyThe same as one-tap, plus accepting Meta's zero-tap terms

Zero-tap and one-tap fall back gracefully. Meta's zero-tap docs say that if the eligibility checks fail, the message tries to show a one-tap button, and then a copy code button. On non-Android phones, customers see copy code. Meta also says it's your responsibility that customers expect the code to fill in automatically, so tell them in your app.

My usual advice: copy code for websites, one-tap for Android apps, and zero-tap only if your app team is happy to maintain the integration. Meta's docs say the older PendingIntent handshake on Android will be deprecated on 31 January 2027, with Meta's OTP Android SDK as the preferred route, so build new integrations on that.

How the flow works, step by step

  • 1. Create the template in the authentication category, pick the button type and language, and choose whether to add the security line and expiry warning.
  • 2. Customer enters their number in your app or website and chooses WhatsApp (or you default to it and offer SMS as an alternative).
  • 3. Your backend generates the code and stores it with an expiry. WhatsApp never generates or checks codes for you.
  • 4. For one-tap or zero-tap, your Android app starts the handshake with WhatsApp before you send.
  • 5. Your backend sends the template through the Cloud API, with the code in both the body and the button parameters, and a time-to-live that matches the code's validity.
  • 6. Watch the status webhook. If the message isn't delivered within a short time, send the code by SMS instead.
  • 7. Customer enters, pastes or auto-fills the code, and your backend checks it.

Limits and costs that catch teams out

Messaging limits apply to OTPs

Authentication templates are messages your business starts, so they count towards your messaging limit. Meta's messaging limits start a new business portfolio at 250 unique customers in a rolling 24 hours, and the limit is shared by every number in the portfolio. Launching OTPs for 5,000 daily sign-ups on a new, unverified portfolio won't work. Verify your business first; our guide on Meta business verification for WhatsApp explains how.

Because the limit is shared, a big OTP volume can also eat into the allowance your marketing and service teams need for their own templates. Plan the numbers together.

What it costs

Meta charges per delivered authentication message, based on the customer's country code. Authentication is priced like utility in South Africa, and Meta charges a higher "authentication-international" rate in some countries for businesses that qualify for it, with 30 days' notice before it applies. Rates are in our WhatsApp API pricing guide, and you can model volumes in the pricing calculator.

Here's an example. A lender sends 30,000 login codes a month to South African numbers. At the authentication rate in our pricing guide (about R0.17 at R18 to the dollar), that's roughly R5,100 a month in Meta fees, before any volume discount. Codes that are never delivered aren't charged.

Security habits worth keeping

  • Keep codes short-lived and single-use, and match the expiry warning to the real expiry.
  • Rate-limit requests per number and per device, so nobody can use your login page to spam people (and burn your messaging limit).
  • Confirm the customer's number belongs to them before you rely on WhatsApp for account recovery.
  • Never ask customers to send the code back to you in a chat. Your agents shouldn't ask for it either.
  • Log every send and delivery status for fraud and support queries.

Where Syncli fits

Syncli is a customer conversation platform, and OTP sending isn't one of its features. Authentication templates are usually sent straight from your own login system through the Cloud API, because the code has to be generated and checked by the system that controls the login.

Where Syncli comes in is everything around it. When a customer can't log in, didn't get a code, or wants to know why an order needs verifying, they message your business. Syncli puts those chats, along with Instagram, Messenger, email and live chat, in one team inbox, routed to the right team, with Syncli Co-pilot to help agents answer. Banks, lenders and insurers can see how this works on our financial services page.

If you're planning OTPs and customer support on WhatsApp at the same time, book a private strategy review. We'll talk through how to set up your numbers and messaging limits so login codes and customer conversations don't get in each other's way.

Frequently asked questions

Yes, through the WhatsApp Business Platform using an authentication template. Meta only allows one-time passcodes in authentication templates, with fixed wording, a copy code or one-tap button, and no URLs, media or emojis.

Keep reading

All posts

See Syncli with your own customer conversations.

Book a free private strategy review. We'll show you one inbox for WhatsApp, Instagram, email and live chat, with Syncli Agents answering first and your team closing the sale.

  • Set up for your industry
  • Official WhatsApp Business API
  • No commitment
Booking an appointment in WhatsApp with Syncli