Tenreply logoTenreply
← Back to Blog
Guide

How to Send OTPs via WhatsApp API (Free and Official)

WhatsApp OTPs have 3× higher delivery and read rates than SMS. Here is how to send one-time passwords through the official WhatsApp Cloud API — with sample API calls included.

Why WhatsApp OTPs Beat SMS

SMS OTPs are simple but unreliable. Delivery rates vary by carrier, SIM country, and network congestion. WhatsApp OTPs, sent through the official Cloud API, reach customers over the internet — with near-100% delivery to WhatsApp users, read rates above 90%, and a blue tick confirmation. For markets like India, Indonesia, and Brazil where WhatsApp is the primary messaging app, this is a significant conversion improvement.

WhatsApp OTP Authentication Templates

Meta provides a special category of template called AUTHENTICATION specifically for OTPs. These templates have a faster approval path and a built-in "Copy Code" button that auto-fills the OTP into apps. To use them, you need:

  • An approved AUTHENTICATION category template in your WABA
  • A WhatsApp Cloud API setup (via a BSP or directly)
  • The customer's phone number with WhatsApp installed

Creating an OTP Template

Authentication templates have a fixed format — you cannot add marketing content or images. The body must follow this structure:

"{{1}} is your verification code. For your security, do not share this code."

Meta also allows you to add:

  • A Copy Code button — one click copies the OTP to clipboard
  • A security disclaimer (automatically appended)
  • An expiry notice — e.g. "This code expires in 10 minutes"

Sending an OTP via the WhatsApp Cloud API

The API call to send a WhatsApp OTP looks like this (replace values with your credentials):

POST https://graph.facebook.com/v19.0/{phone-number-id}/messages
Authorization: Bearer {access-token}
Content-Type: application/json

{
  "messaging_product": "whatsapp",
  "to": "91XXXXXXXXXX",
  "type": "template",
  "template": {
    "name": "otp_verification",
    "language": { "code": "en" },
    "components": [
      {
        "type": "body",
        "parameters": [{ "type": "text", "text": "847291" }]
      },
      {
        "type": "button",
        "sub_type": "url",
        "index": "0",
        "parameters": [{ "type": "text", "text": "847291" }]
      }
    ]
  }
}

Is It Free?

Authentication conversations have their own per-conversation pricing — typically cheaper than marketing conversations. In India, the per-authentication-conversation rate from Meta is among the lowest globally. You pay only when you initiate the conversation. If the user has messaged you within 24 hours, the OTP reply is covered by the existing service window and costs nothing.

Using Tenreply for OTP Delivery

Tenreply lets you manage and send your authentication templates from the same inbox your support team uses. For programmatic OTP delivery (e.g. from your app backend), you will typically call the WhatsApp Cloud API directly — Tenreply then surfaces the conversation and delivery confirmation in the inbox so your team has full visibility. See our API integration guide for how to set this up.