WhatsApp Cloud API Setup
This guide helps you configure WhatsApp Cloud API to receive messages and integrate them into the Task Tracker flow.
Prerequisites
- A Meta app with WhatsApp product enabled
- A public HTTPS endpoint for webhook callbacks
Step-by-Step
- Create a Meta app and enable the WhatsApp product
- Retrieve credentials
phone_number_id- Access token (temporary or permanent)
- Configure the webhook URLs
POST /webhooks/messaging/whatsappGET /webhooks/messaging/whatsapp(verification)
- Set the verify token
- Make sure
WHATSAPP_SECRETmatches the verify token in Meta
- Make sure
- Subscribe to the
messagesfield for yourphone_number_id
Environment Variables
See Configuration and add:
WHATSAPP_TOKEN=your_whatsapp_token
WHATSAPP_FROM_NUMBER=15551234567
WHATSAPP_FROM_ID=your_phone_number_id
WHATSAPP_SECRET=your_verify_token
Receive Flow
- Meta sends payloads to
POST /webhooks/messaging/whatsapp WhatsAppDriverusesWhatsAppAdapterto produceIncomingMessage[](text only)- Each message is queued and processed by
ProcessIncomingMessageJob
Debugging
- Check logs in
MessagingWebhookController - Test with a sample payload (replace host):
curl -X POST "https://your-host.com/webhooks/messaging/whatsapp" \
-H "Content-Type: application/json" \
-d '{
"entry": [
{
"changes": [
{
"value": {
"messages": [
{
"from": "5511999999999",
"id": "wamid.HBgM...",
"type": "text",
"text": { "body": "App crashes when opening report" }
}
]
}
}
]
}
]
}'