Source: https://gitlab-test-org.docs.pageloop.ai/external-templates/whatsapp/create-authentication-whatsapp-templates

# Create an Authentication WhatsApp Template

Use an Authentication template to send one-time passcodes (OTPs) that verify a user's identity during login or sensitive actions. The message format is predefined (`{{1}} is your verification code.`) and can't include promotional content. Creating one takes five steps:

1. [Create the template](#step-1-create-the-template)
2. [Choose the code delivery type](#step-2-choose-the-code-delivery-type)
3. [Complete the details](#step-3-complete-the-details)
4. [Add more languages](#step-4-add-more-languages-optional) (optional)
5. [Save or send for approval](#step-5-save-or-send-for-approval)

## Step 1: Create the template

Navigate to **Templates → External → WhatsApp Templates**, then click **Create**. Fill in the dialog and click **Create Template**.

| Field             | What to enter                                                                                                                   |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| **Template Name** | A unique name in lowercase, with underscores instead of spaces. For example, `login_otp`.                                       |
| **Integrations**  | The WhatsApp Business Account to create the template in. The template can only send messages from this account's phone numbers. |
| **Category**      | Select **Authentication**.                                                                                                      |
| **Language**      | One or more languages. You can add or remove languages later.                                                                   |

## Step 2: Choose the code delivery type

Under **Code Delivery Type**, choose how users receive the code.

| Delivery type          | How it works                                              | Use it for                                      |
| ---------------------- | --------------------------------------------------------- | ----------------------------------------------- |
| **Zero tap auto-fill** | The code is sent and filled in automatically.             | OTPs sent to your mobile app.                   |
| **One tap auto-fill**  | The user taps an **Autofill** button to fill in the code. | OTPs sent to your mobile app or mobile browser. |
| **Copy code**          | The user copies the code and pastes it.                   | Any device.                                     |

#### Zero tap auto-fill

If zero-tap isn't possible, an auto-fill or copy code message is sent instead.

To use zero-tap, select the checkbox to confirm that you accept the WhatsApp Business Terms of Service for zero-tap authentication, and that your customers expect the code to be filled in automatically.

![](assets/waext-v-2-auth-zero-tap.png)

#### One tap auto-fill

If auto-fill isn't possible, a copy code message is sent instead.

![](assets/waext-v-2-auth-one-tap.png)

#### Copy code

The message shows a **Copy Code** button. No app setup is needed.

![](assets/waext-v-2-auth-copy-code.png)

## Step 3: Complete the details

1. **Set up your app (zero-tap and one-tap only)**

   Under **App Setup**, enter the details of the mobile app where the code should be filled in automatically.

   ![](assets/add-setup-authentication.png)
   | Field                  | What to enter                                                                                                          |
   | ---------------------- | ---------------------------------------------------------------------------------------------------------------------- |
   | **Package Name**       | Your Android app's package name (maximum 224 characters).                                                              |
   | **App Signature Hash** | The signature hash of your app (maximum 11 characters). Meta uses it to verify your app and fill in the code securely. |
   Click **Add App** to add more apps, up to 5.
2. **Enter the button text**

   Enter the text users see on the button in WhatsApp (maximum 25 characters each).

   ![](assets/copy-code-button-authentication.png)
   | Button        | What it does                              | Shown for                      |
   | ------------- | ----------------------------------------- | ------------------------------ |
   | **Auto-Fill** | Fills in the code when the user taps it.  | Zero tap and one tap auto-fill |
   | **Copy Code** | Copies the code so the user can paste it. | All delivery types             |
   > [!NOTE]
   >
   > For zero-tap and one-tap auto-fill, you still need the button text. It's used for the backup message if auto-fill isn't possible.
3. **Add extra security information (optional)**

   Expand **Additional Configuration** to add:
   - **Expiry time for the code**: After the code expires, the auto-fill button is disabled.
   - **Security recommendation**: Adds the text _"For your security, do not share this code."_ to your message.

## Step 4: Add more languages (optional)

To reach users in different regions, click **Add** next to **Languages** and add a version of the template in each language. Translate the button text in each language.

## Step 5: Save or send for approval

When your template is ready, save it as a draft or send it to Meta for approval. See [Save as Draft vs Send for Approval](/external-templates/whatsapp/save-or-send-for-approval).
