Send verification codes with an authentication template
An Authentication template sends a one-time verification code, with a button that makes it easy to copy or fill in. Meta sets its text, and you choose the button type and how long the code is valid.
You need: The Create permission in message templates
Steps
1
Create a WhatsApp Cloud template and choose the Authentication category.
2
Choose the Button type: Copy code, One-tap autofill or Zero-tap autofill.
3
For one-tap or zero-tap autofill, add the Android Supported apps (1 to 5). Zero-tap also requires ticking I accept the zero-tap terms.
4
Choose whether to tick Add security recommendation, and set Expires in (minutes), from 1 to 90.
5
Press Create Template, and wait for approval.
When you send the template, you’re asked for the One-time code.
How it works
The template’s body, header and footer aren’t sent, because Meta writes the authentication text itself.
The code comes from you when you send, or from the code variable in an automation. It isn’t read from the record. It fills both the text and the button.
The code isn’t saved in the chat history after it’s sent.
An authentication template isn’t retried when it fails, because the old code is no longer valid. Issue a new code.
If something goes wrong
What you see
Why
What to do
“The authentication template needs the one-time code”
You didn’t enter the code.
Enter the code when you send.
“A WhatsApp one-time code can be 15 characters at most”
The code is too long.
Shorten it.
“A code can only be sent with an authentication template”
You entered a code with another template.
Remove the code.
A real example
Namaa Academy
The situation
The academy’s platform wants to send students a login code on WhatsApp.
What they did
They created an authentication template with a copy code button and a 10-minute validity.
The automation sends the code in the code variable.
The result
Students now copy the code with one tap.
A made-up company, to show the idea. The numbers are rounded.
Good to know
The code is 1 to 15 letters, digits or dashes.
Only one verification code button, and no other buttons.
It isn’t sent to a client who shows as a username without a phone number.