Skip to content

Glossary drawing · Templates

Authentication Template

Also called: OTP template · WhatsApp OTP template · Verification code template · AUTHENTICATION category

Note 1 —A WhatsApp template category for one-time passcodes: Meta supplies the text, you supply the code, and a copy-code, one-tap or zero-tap button delivers it.

Term
Authentication Template
Abbreviation
—
Category
Templates
Level
Practitioner
Reviewed
Sheet no.
GLO-TEM-462
Drawn by
InfiQ Glossary

Drawing 1 · Interactive

Compare the three OTP button types

3 / 3
Compare the three OTP button types. 3 rows by 4 columns. Each cell is a button: activate it to read its note, and use the arrow keys to move between cells.
Where it worksUser effortApp setupIf conditions fail
COPY_CODE
ONE_TAP
ZERO_TAP

Hover, tap or arrow-key through the cells — a dot in the corner means there is a note.

ZERO_TAP by Where it works

Android onlyNeeds app work

Same device and app requirements as one-tap.

Legend — press one to highlight its cells

Each row is one otp_type. Tap a cell to see where it works, what the user has to do, what your app must set up and what WhatsApp shows when the conditions are not met.

Row 3 of 3. ZERO_TAP × Where it works: Android only. Same device and app requirements as one-tap.

What is an authentication template?

An authentication template is a message template in the AUTHENTICATION category, built for one job: delivering a one-time passcode (OTP) or verification code to your own users for login, sign-up, payment confirmation or account recovery. Unlike marketing and utility templates, you do not write the body. Meta supplies preset, localised text: "<code> is your verification code.", an optional security line ("For your security, do not share this code.") switched on with add_security_recommendation, and an optional footer ("This code expires in N minutes.") set with code_expiration_minutes between 1 and 90.

What you choose is how the code reaches the user. Every authentication template carries one OTP button configuration, set with otp_type: COPY_CODE (the user taps a button that copies the code, then pastes it), ONE_TAP (an Android Autofill button hands the code to your app) or ZERO_TAP (no button at all, because your Android app receives the code automatically). One-tap and zero-tap need supported_apps entries with your app's package_name and signature_hash, plus a handshake from your app before each send; when those conditions fail, WhatsApp shows a copy-code button instead.

The content rules are strict by design. The code itself is the only variable, it can be at most 15 characters, and URLs, media and emojis are not supported. That fixed shape makes OTP messages look the same across every business, which helps users recognise genuine codes and makes spoofing harder. It is also why authentication has its own price: in India each delivered authentication message is charged at ₹0.14, and a separate, higher authentication-international rate applies when a business registered in another country sends OTPs to Indian numbers (see /pricing).

Key takeaways

  • An authentication template is the WhatsApp template category built only for one-time passcodes, with body text supplied by Meta.
  • You choose the button: COPY_CODE works on every phone; ONE_TAP and ZERO_TAP need an Android app and fall back to copy code.
  • The OTP is the only variable: up to 15 characters, sent twice, in the body parameter and in the button parameter.
  • Match message_send_ttl_seconds to the code's validity: the default time-to-live is 10 minutes, adjustable from 30 seconds to 15 minutes.
  • In India each delivered authentication message costs ₹0.14; OTPs from businesses registered abroad pay a higher international rate.

How does InfiQ help with an authentication template?

Create authentication templates in InfiQ's template manager and send OTPs through InfiQ's API with the same body Meta's Cloud API takes, with delivery reported per message.

InfiQ API reference

Specifications

An authentication template: key facts and limits

Body text
Preset by Meta, localised, not editable
Button types
COPY_CODE, ONE_TAP, ZERO_TAP
Code length
Up to 15 characters
Expiry footer
code_expiration_minutes 1–90
Time-to-live
Default 10 min, 30 s to 15 min
Not allowed
URLs, media and emojis
India rate
₹0.14 per delivered message

Operating sequence

How does an authentication template work?

  1. Pick the button type

    Start with COPY_CODE, which works on every primary phone. Add ONE_TAP or ZERO_TAP only when you control an Android app and can register its package name and signing-key hash.

  2. Create the template

    POST to /{WABA_ID}/message_templates with category: AUTHENTICATION, a BODY with add_security_recommendation, an optional FOOTER with code_expiration_minutes and a BUTTONS component of type: OTP. To create one name in several languages at once, the upsert_message_templates edge accepts a languages array.

  3. Set a short time-to-live

    Authentication messages default to a 10-minute time-to-live, adjustable from 30 seconds to 15 minutes with message_send_ttl_seconds. Match it to your code's validity so an expired code is never delivered late.

  4. Handshake on Android (one-tap and zero-tap)

    Before each send your app tells WhatsApp it expects a code. The handshake must be no older than 10 minutes, or than code_expiration_minutes if set, otherwise the message falls back to a copy-code button.

  5. Send the code

    Call /{PHONE_NUMBER_ID}/messages with the template name and the OTP twice: once as the body parameter and once as the button parameter. WhatsApp stores the OTP button as a URL button, so the button component uses sub_type: url and index: 0.

  6. Track and verify

    Watch the status webhooks for delivered and read, verify the code your user enters server-side, and offer an SMS or voice fallback when a message is not delivered within your timeout.

Implementation

An authentication template in code

curl -X POST "https://api.infiq.in/v1/messages" \
-H "X-INFIQ-API-KEY: {INFIQ_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"messaging_product": "whatsapp",
"to": "919812345678",
"type": "template",
"template": {
"name": "login_otp",
"language": { "code": "en_US" },
"components": [
{ "type": "body",
"parameters": [ { "type": "text", "text": "482913" } ] },
{ "type": "button", "sub_type": "url", "index": "0",
"parameters": [ { "type": "text", "text": "482913" } ] }
]
}
}'

The same OTP appears twice: in the body and in the button parameter.

Failure modes

Common mistakes with an authentication template

  • Trying to customise the wording

    Adding a brand line, a link or a promo to an OTP gets the template rejected. Put branding in your display name and profile, and keep the template to the preset text and toggles.

  • Sending OTPs from a utility or marketing template

    Verification codes belong in the authentication category, which is priced and formatted for them. The rule runs both ways: a template wrongly filed as authentication is rejected with no appeal, so keep codes and only codes in this category.

  • Building only one-tap or zero-tap

    Both are Android-only and depend on a fresh handshake. iPhone users, handshake timeouts and signature mismatches all land on the copy-code button, so test that path as carefully as the automatic one.

  • Leaving the default time-to-live

    If your code is valid for 5 minutes but the message can still be delivered later, users receive dead codes. Set message_send_ttl_seconds to match the code's validity.

  • Assuming linked devices show the code

    On the Cloud API, authentication messages sent to linked devices such as WhatsApp desktop are masked with a prompt to view them on the primary phone. Tell users the code arrives on the phone that holds their WhatsApp account.

Design intent

Why does an authentication template matter?

OTP delivery sits on the critical path of sign-ups, logins and payments: a code that arrives late or gets lost costs a conversion, and a code delivered in a spoofable format costs trust. Authentication templates give developers a standard, quickly reviewed format with device-level autofill on Android, a clear expiry footer, delivery receipts and a price set specifically for verification traffic, which is why many Indian apps now offer WhatsApp alongside or ahead of SMS OTP.

Example: Login codes for a Pune lending app

A Pune-based lending app sends login OTPs from an AUTHENTICATION template with the security recommendation on, a 5-minute expiry footer and a matching 300-second time-to-live. Android users who installed the app get a one-tap Autofill button because the app performs the handshake just before requesting the code; iPhone users and anyone whose handshake has lapsed see the copy-code button. If no delivered status arrives within 20 seconds, the backend offers "Send by SMS instead", and every delivered code is billed at the authentication rate.

Recommended practice

Best practices for an authentication template

  • Confirm the user's WhatsApp number before sending, and say on screen that the code is going to WhatsApp.
  • Use one template name with several languages and pick the language from the user's app locale at send time.
  • Show a visible timer in your app that matches code_expiration_minutes, so the footer and the UI agree.
  • Offer the SMS or voice fallback only after a timeout with no delivered status, so users are not sent two live codes at once.
  • Rate-limit OTP requests per number and per device to block artificially inflated traffic.

Authentication Template FAQs

Can I write my own text for a WhatsApp OTP message?+
No. The body is preset by Meta for each language. You can only switch on the security recommendation, add an expiry footer, set the copy-code button label (up to 25 characters) and choose the button type.
Which authentication button type should I use?+
Copy code is the safe default because it works on every primary phone. Add one-tap or zero-tap if you have an Android app and want to remove the paste step; the message still falls back to copy code when the conditions are not met.
Why does the send request use a URL button for an OTP?+
Because WhatsApp stores the OTP button as a URL-type button when the template is created. The send payload therefore passes the code in a button component with `sub_type: url` and `index: 0`, alongside the body parameter.
How much does a WhatsApp authentication message cost in India?+
Meta charges per delivered message by category. InfiQ's India rate for authentication is ₹0.14 per delivered message; OTPs sent to Indian users by businesses registered in another country are charged a higher authentication-international rate.
Is an authentication template the same as the WhatsApp two-step verification PIN?+
No. An authentication template sends one-time codes to your customers, while the six-digit two-step verification PIN locks your own business phone number against re-registration. One is a message format you send; the other is a security setting on the number, managed in WhatsApp Manager.

See InfiQ pricing

* Per-message rates for India, ex-GST: marketing, utility and authentication effective 1 July 2026; service messages ₹0.145 since 1 October 2026 after the first 1,000 a month on each WhatsApp number, which are free (all were ₹0 until 30 September 2026). Volume commitments earn discounts — final rate is confirmed on your account; applicable GST extra. Rates for other countries differ (see the international rate table on /pricing).

Put Authentication Template to work

InfiQ is an official Meta Business Partner. Start a 7-day free trial — no card needed — and see this running on your own number.