Connecting OpenClaw to WhatsApp requires navigating Meta's WhatsApp Business API, which involves business account verification, webhook configuration, and template message approval. This advanced guide walks you through every step of the integration process, from Meta Business account creation to handling media and rich messages.
Why This Is Hard to Do Yourself
These are the common pitfalls that trip people up.
Business API complexity
WhatsApp requires a Meta Business account, app creation, phone number verification, and webhook setup before sending a single message
Webhook verification
WhatsApp uses a challenge-response verification flow that must be handled correctly or your webhook never receives messages
Template requirements
You can't send proactive messages without pre-approved templates. Template approval takes 24-48 hours.
24-hour messaging window
After 24 hours of inactivity, you can only send template messages, not free-form responses
Step-by-Step Guide
Create a Meta Business account
Register at business.facebook.com. Get a verified business account.
Create a WhatsApp Business App
# 1. Go to developers.facebook.com
# 2. Create a new App โ select "Business" type
# 3. Add "WhatsApp" product to your app
# 4. Note your Phone Number ID and Access TokenSet up the webhook endpoint
# In OpenClaw config/channels/whatsapp.yaml:
whatsapp:
enabled: true
phone_number_id: "YOUR_PHONE_NUMBER_ID"
access_token: "YOUR_PERMANENT_ACCESS_TOKEN"
verify_token: "your-custom-verify-string"
webhook_path: "/webhooks/whatsapp"Warning: The access token from the Meta dashboard is temporary (24 hours). Generate a permanent System User access token for production use.
Configure webhook verification
# OpenClaw handles verification automatically when configured.
# Register your webhook URL in Meta Developer Portal:
# Callback URL: https://your-domain.com/webhooks/whatsapp
# Verify Token: your-custom-verify-string (must match config)
# Subscribe to: messages, messaging_postbacksCreate message templates
# Templates must be approved by Meta before use.
# Create in WhatsApp Manager โ Message Templates
# Example template:
# Name: welcome_message
# Category: Marketing
# Body: "Hi {{1}}, thanks for reaching out! How can I help?"
# Submit for review (24-48 hours)Test the integration
# Send a test message from your WhatsApp to the registered number.
# Check OpenClaw logs:
tail -f ~/.openclaw/logs/channels.log | grep whatsapp
# You should see incoming message eventsHandle media and rich messages
# In config/channels/whatsapp.yaml (continued):
media:
enabled: true
max_file_size_mb: 16
supported_types:
- image/jpeg
- image/png
- application/pdf
- audio/oggWhatsApp Setup Is a Full Project
Meta Business verification, webhook configuration, template approval, and the 24-hour messaging window โ our integration experts handle all of it. Most WhatsApp integrations are live within a day.
Get matched with a specialist who can help.
Sign Up for Expert Help โ