> For the complete documentation index, see [llms.txt](https://doc.batch.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.batch.com/guides-and-best-practices/message/universal-channel/how-to-send-a-whatsapp-message-meta.md).

# How to send a WhatsApp message - META

With this setup, Batch directly calls the Meta API to send a WhatsApp message to your users.

### Prerequisites

Before starting, make sure you have completed the following setup in Meta:

* A [**Meta Business Manager account**](https://www.facebook.com/business/tools/business-manager/get-started-guide)
* A [**WhatsApp Business Account (WABA)**](https://developers.facebook.com/documentation/business-messaging/whatsapp/whatsapp-business-accounts/) created in Business Manager
* A **Meta app** with the [**WhatsApp product enabled**](https://developers.facebook.com/documentation/business-messaging/whatsapp/get-started)
* A **sender phone number**
  * Test → generated in `developers.facebook.com`
  * Production → requires business verification
* An **approved** [**display name**](https://developers.facebook.com/documentation/business-messaging/whatsapp/display-names/)
* An **approved** [**message template**](https://developers.facebook.com/documentation/business-messaging/whatsapp/templates/marketing-templates)
  * Created in **WhatsApp Manager → Message templates**
* An [**access token**](https://developers.facebook.com/documentation/business-messaging/whatsapp/access-tokens/) for a **system user** with permissions:
  * `whatsapp_business_messaging`
  * `whatsapp_business_management`
  * `business_management`

{% stepper %}
{% step %}

### Step 1 — Add your META creditential into Batch

Batch needs to authenticate requests to Meta.

1. Go to **Settings → Channels → Universal**
2. Click **New Credential Headers**
3. Choose a name (e.g., “META - Whatsapp”)
4. Key → `Authorization`
5. Value → paste the bearer token from META (e.g., "Bearer YOUR\_TOKEN")
6. Save

<figure><img src="/files/Us1xLMYZC1Wih5lBgIP4" alt="Add the information in the Universal channel settings"><figcaption><p>Add the information in the Universal channel settings</p></figcaption></figure>

> **Note:** You only need to add the credential once in Batch.
> {% endstep %}

{% step %}

### Step 2 — Configure the Universal step in Batch

In this step, you will add the Universal step in your Batch automation and configure it to trigger the Whatsapp message.

**Add the Universal Step**

1. Open the Batch automation where you want to trigger WhatsApp
2. Click the **+** button
3. Select **Universal**

This opens the Universal step configuration screen.

![](https://doc.batch.com/~gitbook/image?url=https%3A%2F%2F2998247023-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FbwlQFpRAhaFR79zae6Jf%252Fuploads%252FxObMCTr1fbP1eRYixRs8%252Funiversal%2520channel%25205.png%3Falt%3Dmedia%26token%3D87743033-d6d4-4e95-bcdd-571907dbb37b\&width=768\&dpr=3\&quality=100\&sign=341f2970\&sv=2)

**Configure the META request**

Fill in the fields using the information from META:

**1. Destination URL**

Paste the URL shown in META's API trigger : `https://graph.facebook.com/v22.0/{Sender-Phone-Number-ID}/messages`

**3. Headers**

* Choose the credential header you created earlier (e.g., "**META - Whatsapp"**)
* Add another header :
  * "Key" : `Content-Type`
  * "Value" : `application/json`

**4. JSON Body**\
\
**Example:**

```
{
    "messaging_product": "whatsapp", 
    "recipient_type": "individual", 
    "to": "{{b.phone_number}}", 
    "type": "template", 
    "template": {"name": "YOU_TEMPLATE_ID"}, 
    "language": { "code": "fr"} 
}
```

<figure><img src="/files/7wyZASNwm2VXbIXRRTDb" alt="Configure the universal channel step"><figcaption><p>Configure the universal channel step</p></figcaption></figure>
{% endstep %}

{% step %}

### Step 3 — Test the connection&#xD;<br>

Once your Universal Step is configured, you can test it directly from Batch to make sure everything is working properly.

**How to test**

1. In the Universal Step, click **Test API**.
2. If your JSON body includes personalization (e.g., `{{b.phone_number}}`), choose a **test profile** so Batch can fill in real data.
3. Click to send the test request.

<figure><img src="/files/GUxU70YlVRU03scI7qPo" alt="Use the &#x22;Test API&#x22; button in order to make sure everything is working properly"><figcaption><p>Use the "Test API" button in order to make sure everything is working properly</p></figcaption></figure>

**What the test does**

* Batch performs the exact same API call it will make when the automation is live.

**What Batch validates**

Batch will display whether the request was **successfully delivered** to META or if something needs fixing (e.g., wrong URL, missing key, invalid JSON).

> **Note:** Batch can only confirm that the trigger was correctly called. It does not have visibility on what happens inside META afterward (e.g., whether the message was sent or failed).
> {% endstep %}

{% step %}

### Step 4 — Activate your Batch automation

When the test is successful, you can turn your Batch automation live.

**To activate**

1. Review your workflow, including the Universal step.
2. Run your automation

**Once live**

* Every time a profile moves through this step in your automation, Batch will send the whatsapp message.

**Additional Universal steps**

If you want to trigger multiple WhatsApp scenarios (e.g., a follow-up message, or different Whatsapp messages), you can add more Universal Steps within the same Batch automation or in a new one by following these steps again (Step 1 can be skipped).
{% endstep %}
{% endstepper %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://doc.batch.com/guides-and-best-practices/message/universal-channel/how-to-send-a-whatsapp-message-meta.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
