Skip to main content
WhatsApp Authentication templates provide a secure, high-delivery-rate channel for sending one-time passwords (OTP) and verification codes. This guide covers creating, submitting, and sending OTP messages.

Overview

Authentication templates are purpose-built for verification codes:
  • High delivery rates - WhatsApp messages have 98%+ open rates
  • Instant delivery - Codes arrive in seconds
  • User-friendly - Copy button or auto-fill on Android
  • Cost-effective - Lowest messaging rates of all template categories
  • Secure - End-to-end encrypted delivery

Prerequisites

Before creating OTP templates, ensure you have:

Meta Business Verification

Your Meta Business account must be verified

WhatsApp Connected

A sender with WhatsApp Business Account configured

Payment Method

Valid payment method configured in Meta Business Manager

API Key

A Zavu API key for your project

Step 1: Create OTP Template

Via Dashboard

  1. Navigate to Senders in your dashboard
  2. Select the sender with WhatsApp connected
  3. Go to the Templates tab
  4. Click Create Template
  5. Configure the template:
    • Name: Use a descriptive name like otp_verification
    • Channel: Select WhatsApp only
    • Category: Select AUTHENTICATION
    • Language: Choose your language (e.g., en)
  6. Configure the OTP button:
    • Button Type: Choose Copy Code or One-Tap (Android only)
  7. Optional settings:
    • Enable Security Recommendation to add “Do not share this code”
    • Set Code Expiration (1-90 minutes)
  8. Click Create

Via API

Meta auto-generates the message body for authentication templates. The format is always: {{1}} is your verification code. followed by optional security text and expiration.

Step 2: Submit for Meta Approval

Authentication templates typically receive fast approval (within hours).

Via Dashboard

  1. Go to Senders > Select sender > Templates tab
  2. Find your template with “Draft” status
  3. Click the menu and select Submit for Approval

Via API

Expected Approval Time

Authentication templates are prioritized by Meta and usually approved within hours. If approval takes longer, ensure your Meta Business is fully verified.

Step 3: Send OTP Messages

Once approved, send verification codes to users:

What the User Sees

The user receives a message like:

OTP Button Types

The Copy Code button allows users to tap and copy the code to their clipboard.
Benefits:
  • Works on all platforms (iOS, Android, Web)
  • Simple user experience
  • No additional configuration required

ONE_TAP (Android Only)

The One-Tap button enables automatic code filling in your Android app.
Requirements:
  • Android app only
  • Must provide packageName (Android package name)
  • Must provide signatureHash (Android app signature hash)
How to get your signature hash:
  1. In your Android app, use the SMS Retriever API helper:
  1. The hash is an 11-character string like K8a+W1234ab
One-Tap auto-fill only works on Android. iOS users will see a standard copy button. Always ensure your flow works without auto-fill as a fallback.

Template Options

Security Recommendation

Add a security disclaimer to your OTP message:
This adds: “For your security, do not share this code.”

Code Expiration

Display when the code expires:
This adds: “This code expires in 10 minutes.”

Best Practices

Use Short Expiration

Set expiration to 5-10 minutes for security. Shorter is better.

Enable Security Warning

Always enable addSecurityRecommendation to protect users from phishing.

Generate Secure Codes

Use cryptographically secure random number generators for OTP codes.

Rate Limit Requests

Limit OTP requests per user to prevent abuse (e.g., 5 per hour).

OTP Code Guidelines

  • Use 6-digit numeric codes for balance of security and usability
  • Generate codes using secure random functions
  • Store codes with expiration timestamps
  • Invalidate codes after successful verification
  • Limit verification attempts (e.g., 3 tries per code)

Common Issues

Webhook Events

Track OTP delivery status via webhooks:
Configure webhooks to receive:
  • message.sent - OTP accepted by WhatsApp
  • message.delivered - OTP delivered to device
  • message.failed - Delivery failed
See Webhooks Guide for setup instructions.

Next Steps

Template Approval

Learn more about the approval process and common rejection reasons

Configure Webhooks

Set up webhooks to track delivery status

Smart Routing

Use smart routing to automatically fall back to SMS if WhatsApp fails

Rate Limiting

Understand API rate limits for high-volume OTP sending