Skip to content

One-Tap Autofill

An Android-only authentication-template button that, after an app handshake and signature check, passes the OTP into your app with a single tap.

Also called: One-tap autofill button · ONE_TAP OTP button · WhatsApp OTP autofill · Autofill authentication template

Reviewed

Interactive lab

Hands on: use the controls to explore. Anything that plays on its own pauses while you are working inside it.

Watch a code travel from server to app in one tap

8 / 8
  • Your Android appOTP SDK
  • Your server
  • Cloud API
  • WhatsAppsame phone

Step 8 of 8Response

Your serverYour Android app

Verified: signed in

Expiry and attempt limits are still enforced here.

  • Request — solid arrow — a call that expects an answer
  • Response — dashed arrow — the answer coming back
  • Event — dotted arrow — something happened and is pushed out
  • Async — double head — fire-and-forget, nobody waits
The handshake, the send, WhatsApp's eligibility check and the hand-off back to your app, message by message. Select any step to read what is checked there and what happens if it fails.

Step 8 of 8: Your server to Your Android app — Verified: signed in. Expiry and attempt limits are still enforced here.

01What is one-tap autofill?

One-tap autofill is one of three button types for WhatsApp authentication templates. It sits between copy code, where the user copies the code and pastes it into your app, and zero-tap, where the code reaches the app with no action at all. When its conditions are met, the delivered message shows an autofill button; tapping it opens your Android app and hands it the one-time passcode, so the user never retypes digits.

It works only for Android apps that prepare for it. Before your server asks for the code to be sent, the app performs a handshake with the WhatsApp or WhatsApp Business app on the same phone — Meta's WhatsApp OTP Android SDK sends the com.whatsapp.otp.OTP_REQUESTED intent and returns a handshake ID. When the message arrives, WhatsApp runs an eligibility check: a handshake inside the time window (10 minutes by default, or the template's code_expiration_minutes), a matching package_name, no other app from the template's supported_apps list having handshaked in the same window, a signature_hash that matches the installed app's signing key, and an activity that handles com.whatsapp.otp.OTP_RETRIEVED.

If any check fails — no handshake, a different build, a debug signing key, a non-Android phone — the button becomes a copy-code button labelled with the template's text, so the message is never useless. Meta extended the migration deadline for the older PendingIntent-based handshake to 15 October 2026, after which that method is deprecated, and names the OTP Android SDK as the preferred way to integrate. Separately, iOS 26 and later has shown a keyboard autofill suggestion for authentication messages since 15 June 2026 without any integration; that is an iOS feature, not one-tap autofill.

Key takeaways

  • One-tap autofill is an Android-only authentication-template button that hands the OTP to your app when the user taps it once.
  • It needs an app handshake through Meta's OTP Android SDK plus a matching package_name and an 11-character signature_hash.
  • If any check fails, or the phone is not Android, WhatsApp shows a copy-code button instead, so the code still reaches the user.
  • Meta set 15 October 2026 as the deadline to move off the older PendingIntent-based handshake; the OTP Android SDK is its preferred path.
  • Your server still verifies the code, its expiry and attempt limits; autofill only moves the digits into the app.

02 · How it works, step by step

How does one-tap autofill work?

  1. Step 1

    Create the template with a one-tap button

    In an authentication template, add a BUTTONS component with type: otp and otp_type: one_tap, an autofill_text label, a fallback text, and up to five supported_apps, each with a package_name and an 11-character signature_hash.

  2. Step 2

    Handshake from the app

    When the user asks for a code, the app calls the SDK's sendOtpIntentToWhatsApp() and stores the handshake ID it returns, then asks your server to send the code.

  3. Step 3

    Send the template

    Your server sends the authentication template through /messages, with the code as the body parameter and again in a button component (sub_type: url, index: 0). The code must appear twice.

  4. Step 4

    WhatsApp checks eligibility

    On the phone, WhatsApp confirms the handshake is recent, came from your package alone, and that the signature hash matches. Pass: the autofill button shows. Fail: a copy-code button shows instead.

  5. Step 5

    Your app receives the code

    When the user taps, WhatsApp starts your activity with com.whatsapp.otp.OTP_RETRIEVED. The SDK's processOtpCode() checks the handshake ID and returns the code, which your server verifies as usual.

03One-tap autofill in code

{
"name": "login_code",
"language": "en",
"category": "AUTHENTICATION",
"components": [
{ "type": "BODY", "add_security_recommendation": true },
{ "type": "FOOTER", "code_expiration_minutes": 5 },
{ "type": "BUTTONS", "buttons": [{
"type": "otp",
"otp_type": "one_tap",
"text": "Copy code",
"autofill_text": "Autofill",
"supported_apps": [
{ "package_name": "in.example.tickets", "signature_hash": "K8a/AINcGX7" }
]
}] }
]
}

POST this to /{WABA_ID}/message_templates. The body text is Meta's; you only choose the options.

04 · Common mistakes, and the fix

Common mistakes with one-tap autofill

  • Registering only the release signature

    Debug and staging builds signed with other keys fail the signature check and see copy code, which looks like a broken integration. Add each build's package name and hash as its own supported_apps entry, or test with release-signed builds.

  • Sending before the handshake

    If the server sends the template before the app handshakes — or long after it — the window check fails and the user gets copy code. Trigger the handshake in the same action that requests the code.

  • Treating autofill as verification

    Autofill only moves the digits. Your server must still verify the code, enforce its expiry, limit attempts and rate-limit requests, exactly as with SMS or copy code.

  • Sending the code only once

    Authentication sends need the code in the body parameter and in the button parameter. Leaving out the button component makes the request incomplete; build both from the same variable.

  • Staying on the deprecated handshake

    Meta's migration deadline for the PendingIntent-based handshake was 15 October 2026. Move to the OTP Android SDK so the integration follows the path Meta now documents, and retest autofill on a release build afterwards.

05One-tap autofill: key facts and limits

Platform
Android only; other devices see copy code
Handshake window
10 minutes, or code_expiration_minutes
supported_apps
Up to 5 apps
signature_hash
Exactly 11 characters
autofill_text / text
Up to 25 characters each
OTP value
Up to 15 characters, sent twice
code_expiration_minutes
1 to 90
Default message TTL
10 minutes (30 seconds to 15 minutes)

06Why does one-tap autofill matter?

Every extra step in an OTP flow loses users, and switching apps to retype a code is the step where most of them hesitate or mistype. One-tap autofill removes that switch while keeping a visible action the user chooses — a middle ground for teams that cannot meet zero-tap's requirements or want the user to confirm. Because it falls back to copy code automatically, it is low-risk to adopt: the worst case is the experience you already had.

07 · Tips from the bench

Best practices for one-tap autofill

  • Make the fallback text label clear — it is what iPhone users and failed checks see.
  • Match the template's code_expiration_minutes to your server-side expiry so the button and the code age together.
  • Log whether each login completed through autofill or manual entry to measure the lift.
  • Keep one-tap as the visible option and consider zero-tap only where no confirmation is wanted.

08Example: A ticketing app's login on Android and iPhone

A Kochi bus-ticketing app adds one-tap autofill to its login. On Android, the user taps “Get code”, the app performs the handshake, and seconds later a WhatsApp message with an Autofill button appears; one tap returns them to the app, signed in. QA builds showed “Copy code” instead because they use a .debug package signed with the debug key, so the team registered that package and hash as a second supported_apps entry. iPhone users receive the same template with a copy-code button, and on iOS 26 the keyboard also suggests the code.

09One-Tap Autofill FAQs

Does one-tap autofill work on iPhone?+
No. It is Android-only; iPhone users receive the same template with a copy-code button. Since 15 June 2026, iOS 26 and later can also suggest the code from the keyboard without any integration.
What happens if the eligibility check fails?+
WhatsApp shows a copy-code button labelled with the template's `text` instead. The message still delivers and the code still works.
Why is the WhatsApp autofill button not showing?+
One of WhatsApp's eligibility checks failed, so the message fell back to a copy-code button. Confirm the phone is Android, the handshake ran just before the send, the package name and 11-character signature hash match the installed build (debug builds differ), and your app declares an activity for `OTP_RETRIEVED`.
How is one-tap different from zero-tap?+
Zero-tap delivers the code to the app with no tap and requires accepting extra terms; one-tap waits for the user to tap Autofill. Both need the handshake and signature hash, and both fall back to copy code.
Does one-tap autofill cost more than copy code?+
No. Either way it is an authentication template, charged per delivered message at the authentication rate (₹0.14 in India on InfiQ's card, ex-GST). A higher authentication-international rate applies to codes sent to Indian users by businesses registered abroad.

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 (they 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).

From definition to your first message

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