Help Center/Integrations/Adding WhatsApp Support
Back to Help Center
Integrations

Adding WhatsApp Support

Learn how to integrate WhatsApp messaging with your AI agent

Overview

WhatsApp Business API allows you to integrate your AI agent with WhatsApp. This requires a WhatsApp Business account and API access.

Note: WhatsApp Business API is more complex than Telegram or Discord and may require business verification.

Prerequisites

  • WhatsApp Business Account
  • Facebook Business Manager account
  • Verified business (for production use)
  • WhatsApp Business API access

Getting WhatsApp Business API Access

There are two main approaches:

Option 1: WhatsApp Cloud API (Recommended)

  1. Go to Meta for Developers
  2. Create or select an app
  3. Add WhatsApp product
  4. Follow setup wizard
  5. Get your API credentials

Option 2: Business Solution Provider (BSP)

Work with an official WhatsApp BSP like:

  • Twilio
  • MessageBird
  • 360Dialog

These providers handle infrastructure and provide easier setup.

Configuration in AgentClaw

Add these environment variables based on your provider:

For WhatsApp Cloud API

WHATSAPP_PHONE_NUMBER_ID=your_phone_number_id WHATSAPP_ACCESS_TOKEN=your_access_token WHATSAPP_VERIFY_TOKEN=your_verify_token WHATSAPP_BUSINESS_ACCOUNT_ID=your_business_account_id

For Twilio

TWILIO_ACCOUNT_SID=your_account_sid TWILIO_AUTH_TOKEN=your_auth_token TWILIO_WHATSAPP_NUMBER=whatsapp:+14155238886

Webhook Setup

WhatsApp requires a webhook for receiving messages:

  1. In WhatsApp Configuration, set webhook URL to:
    https://your-instance.agentclaw.app/webhook/whatsapp
  2. Add verify token (matches WHATSAPP_VERIFY_TOKEN)
  3. Subscribe to messages webhook events

Testing

  1. Save configuration and restart instance
  2. Send a WhatsApp message to your business number
  3. Bot should respond via AI
  4. Check logs for webhook events

Limitations & Pricing

  • Message templates: First message to user must use approved template
  • 24-hour window: Can send free-form messages within 24h of user message
  • Costs: WhatsApp charges per conversation (separate from AgentClaw)
  • Verification: Business verification required for production

Next Steps

Still need help?

Our support team is ready to assist you with any questions.

Contact Support