> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pipecat.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# WhatsApp Business Calling API

> Learn how to receive WhatsApp voice calls in your Pipecat Cloud application

## Overview

This guide explains how to integrate WhatsApp Business voice calling into your **Pipecat Cloud** application using the **WhatsApp Cloud API** and **SmallWebRTC**. Once configured, your Pipecat Cloud bot will be able to receive and handle real-time voice calls directly from WhatsApp users.

> For a more detailed explanation of WhatsApp Business setup, voice calling, and webhook configuration, refer to our [full WhatsApp Business Calling guide](/pipecat/features/whatsapp).

***

## Pipecat Cloud–Specific Setup

In Pipecat Cloud you only need to ensure your bot is deployed and your environment variables are configured correctly.

### Configure Webhook for Pipecat Cloud

Your webhook URL must point to your deployed Pipecat agent:

```
https://api.pipecat.daily.co/v1/public/webhooks/$ORGANIZATION_ID/$AGENT_NAME/whatsapp
```

* **Important:** Use your **public API key** as the `Verify Token` for Meta Developer Console verification.
* Always include the `/whatsapp` path at the end of the webhook URL.
* Make sure your Pipecat agent is **deployed and running**.

### Pipecat Cloud Secrets

In Pipecat Cloud, configure the following environment variables as **secrets**.

```bash theme={null}
WHATSAPP_TOKEN=<your_access_token>
WHATSAPP_PHONE_NUMBER_ID=<your_phone_number_id>
WHATSAPP_APP_SECRET=<your_app_secret>
```

If you have them in a `.env` file, you can upload to Pipecat Cloud as a secret set like this:

```bash theme={null}
uv run pipecat cloud secrets set whatsapp-secrets --file .env
```

This creates a secret set named `whatsapp-secrets` and securely stores your API keys for your Pipecat Cloud agent.

> For instructions on generating the access token, phone number ID, and app secret, refer to the [WhatsApp Cloud API Configuration](/pipecat/features/whatsapp#whatsapp-configuration).

### Example

Your bot must use `SmallWebRTCTransport` with audio enabled:

```python theme={null}
transport = SmallWebRTCTransport(
    webrtc_connection=webrtc_connection,
    params=TransportParams(
        audio_in_enabled=True,
        audio_out_enabled=True,
    ),
)
```

## Full demo

<Card horizontal title="Demo" icon="play" href="https://github.com/pipecat-ai/pipecat-examples/tree/main/p2p-webrtc/pipecat-cloud">
  Pipecat Cloud WhatsApp Demo
</Card>

### Testing Calls

1. From WhatsApp, call your registered WhatsApp Business number.
2. The call will be routed to your Pipecat Cloud agent.
3. The bot should automatically answer and handle the conversation.

### Troubleshooting

Common Pipecat Cloud issues:

1. **Webhook Verification Failed**
   * Verify the public API key matches the verify token in Meta Developer Console.
   * Ensure the webhook URL is using the right organization and service names.

2. **Bot Not Answering Calls**
   * Ensure the WhatsApp Business number has calling enabled.
   * Ensure that the WhatsApp token is still valid.

> For a complete troubleshooting section, see [WhatsApp Business Calling guide](/pipecat/features/whatsapp#troubleshooting).
