Send Authentication Template

Send an authentication template (OTP). You usually need to pass the OTP code to both the body (for display) and the button (for copy-code or one-tap functionality).

Example Request Body

{
  "messaging_product": "whatsapp",
  "recipient_type": "individual",
  "to": "<CUSTOMER_PHONE_NUMBER>",
  "type": "template",
  "template": {
    "name": "<TEMPLATE_NAME>",
    "language": {
      "code": "<TEMPLATE_LANGUAGE_CODE>"
    },
    "components": [
      {
        "type": "body",
        "parameters": [
          {
            "type": "text",
            "text": "<ONE-TIME PASSWORD>"
          }
        ]
      },
      {
        "type": "button",
        "sub_type": "url",
        "index": "0",
        "parameters": [
          {
            "type": "text",
            "text": "<ONE-TIME PASSWORD>"
          }
        ]
      }
    ]
  }
}
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required
Defaults to v24.0

API Version (e.g., v24.0)

string
required

The ID of the phone number sending the message.

Body Params
string
required
Defaults to whatsapp
string
Defaults to individual
string
required

Recipient Phone Number

string
required
Defaults to template
template
object
required
Headers
string
required

Provide your Access Token. Format: YOUR_API_KEY

Response

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json