WhatsApp API
WhatsApp OTP

WhatsApp OTP API

Send verification codes through approved WhatsApp authentication templates for signups, logins, password resets, transaction approval, and other secure customer actions.

Try this with AI Copilot
Show me how to send WhatsApp OTP messages using the SMSLeopard API
Ask AI →

Why Use WhatsApp For OTPs

WhatsApp OTPs are useful when your customers already engage with your business on WhatsApp and you want verification to feel familiar, branded, and easy to complete.

Use caseCustomer experience
Account signupCustomer receives a code in WhatsApp and completes registration
Login verificationCustomer confirms access without switching to email
Password resetCustomer receives a short-lived code in a trusted conversation
Transaction approvalCustomer verifies a payment, order, or account change

Template Requirements

WhatsApp OTPs use Meta-approved authentication templates. Fetch your approved templates with the Templates endpoint, then send the selected template with the code as a variable.

⚠️

Generate, store, expire, and validate OTPs in your own application. The WhatsApp API delivers the template message; your product should enforce security controls such as expiry and retry limits.

Endpoint

POSThttps://whatsapp.smsleopard.com/v1/whatsapp/send

Example Request

curl -X POST "https://whatsapp.smsleopard.com/v1/whatsapp/send" \
  -H "Authorization: Basic $(echo -n 'api_key:api_secret' | base64)" \
  -H "Content-Type: application/json" \
  -d '{
    "destination": "254720000000",
    "template_id": "AUTH_TEMPLATE_ID",
    "phone_number_id": "WHATSAPP_PHONE_NUMBER_ID",
    "component_list": {
      "components": [
        {
          "component_type": "BODY",
          "fields": [
            { "name": "1", "value": "483921" }
          ]
        }
      ]
    }
  }'

Related Guides