Skip to main content

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 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_NAME/$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.
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:
uv run pcc 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.

Example

Your bot must use SmallWebRTCTransport with audio enabled:
transport = SmallWebRTCTransport(
    webrtc_connection=webrtc_connection,
    params=TransportParams(
        audio_in_enabled=True,
        audio_out_enabled=True,
        vad_analyzer=SileroVADAnalyzer(),
    ),
)

Full demo

Demo

Pipecat Cloud WhatsApp Demo

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.
I