Send one-time passcodes

If you send login or verification codes, this is the category to use. Authentication templates are cheaper than the alternatives, and they get the tap-to-copy button that makes a code usable on a phone.

What makes them different

Meta fixes the shape. You do not write the message freely — you choose from a small set of options and Meta assembles it. That is the trade: less control, faster approval, lower price.

Every authentication template has exactly one variable — the code itself.

Steps

  1. In the sidebar, open Channels → WhatsApp → Templates.

    The Wap2b sidebar with Channels, WhatsApp and Templates highlighted
    Templates live under the WhatsApp channel.
  2. Click New template at the top right.

    The Templates page with the New template button at the top right
    Sync from Meta beside it pulls in templates created outside Wap2b.
  3. Pick your number, a name and the language.

  4. Set Category to Authentication. The form changes to the authentication options.

  5. Choose your options:

    • Security recommendation — adds "For your security, do not share this code." Recommended.
    • Code expiration — adds "This code expires in N minutes." Set it to match what your system actually enforces.
    • Copy-code button text — the label on the tap-to-copy button. "Copy code" is fine.
    The authentication template form showing the security recommendation toggle, code expiration and copy-code button text, with the assembled code message in the preview
    There is no body field to write. The preview on the right is the whole message Meta will send.
  6. Save as draft, then Submit to Meta from the template's page. Authentication templates are usually approved quickly.

    A saved authentication template in DRAFT status showing category, language and sender, with the Submit to Meta button
    Nothing reaches Meta until you submit. Edit while it still says DRAFT.

Sending the code

The code goes in as the template's first variable. Everything else — the security line, the expiry text, the button — Meta fills in.

You do not put the code in the button separately. The one value fills both the message text and the copy button.

Generate the code in your own system

Wap2b delivers codes; it does not create or check them. Your application generates the code, decides how long it is valid and verifies it when the customer types it back.

Practical notes

  • Keep expiry short — five to ten minutes is normal — and make sure the number in the message matches what your system enforces. A message promising ten minutes that expires in two generates support calls.
  • Codes are time-critical. If a customer says a code arrived late, check Message logs for the delivery timestamp before assuming.
  • A blocked number never receives the code. If one customer reliably never gets them, that is usually why.

If something goes wrong

  • The message arrives without a copy button. The template was not built in the Authentication category. Categories cannot be switched after approval — create a new one.
  • The code shows as {{1}}. No value was passed for the variable. If sending through the API, check the parameter is present.
  • Rejected on submission. Uncommon for authentication templates, and nearly always a name or language problem rather than content. See Why was my template rejected?
  • Codes are slow to arrive. Check the number's status on Phone numbers — a restricted number delays or drops sends. See My number or account is restricted.

Next

Why was my template rejected?

Still stuck?

If this page did not solve it, tell us what you were trying to do and we will pick it up from there.

Open a support ticket