WhatsApp Integration

Connect your AI agent to WhatsApp and engage with customers on the world's most widely used messaging platform. The integration uses the official WhatsApp Business API for reliable message delivery, rich media support, and template-based proactive messaging.

app.8bit-ai.com
WhatsApp integration

Global Reach

Connect with over 2 billion WhatsApp users across 180 countries

Rich Messaging

Send templates, images, documents, and interactive list messages

Official API

Meta-approved integration with end-to-end encryption and compliance

Prerequisites

Before setting up the WhatsApp integration, ensure you have the following:

Required Accounts

  • A Meta Business Account (formerly Facebook Business Account)
  • A WhatsApp Business Account (WABA) approved by Meta
  • A phone number that is not registered with WhatsApp or WhatsApp Business app
  • Access to the Meta Business Platform at business.facebook.com

WhatsApp Business API Approval Timeline

Meta reviews new WhatsApp Business Accounts before granting API access. The approval process typically takes 1-3 business days. You can begin the setup while waiting for approval — the integration will activate once approved.

Setup Guide

Follow these steps to connect your AI agent to WhatsApp.

1

Create a WhatsApp Business Account

Set up your WhatsApp Business Account through the Meta Business Platform.

  1. aGo to the Meta Business Suite
  2. bNavigate to WhatsApp > Accounts
  3. cClick Add WhatsApp Account and follow the prompts
  4. dRegister a business phone number (cannot be used with regular WhatsApp)
  5. eVerify your business phone number via SMS or voice call
WhatsApp Business API documentation
2

Generate a Permanent Access Token

Create a system user and generate a permanent token for the API.

  1. aIn Meta Business Suite, go to Users > System Users
  2. bClick Add and create a new system user
  3. cAssign the WhatsApp Business Management permission
  4. dGenerate a Permanent Access Token
  5. eCopy the token and your Phone Number ID and Business Account ID

Token Security

Store the permanent token securely. It grants API access to your WhatsApp Business Account. Never expose it in client-side code or commit it to version control.

3

Configure Integration in 8bit-ai

Add your WhatsApp credentials in the 8bit-ai dashboard.

  1. aNavigate to Integrations in your dashboard
  2. bClick on the WhatsApp integration card
  3. cEnter a descriptive name for your integration
  4. dPaste your Permanent Access Token, Phone Number ID, and Business Account ID
  5. eClick Connect to save the integration
4

Connect the WhatsApp integration to your AI agent.

  1. aGo to your agent's settings and open the Integrations tab
  2. bFind your WhatsApp integration under "Available Integrations"
  3. cClick Add to Agent
  4. dThe webhook URL will be configured automatically

Automatic Webhook Registration

When you link the integration, 8bit-ai automatically registers a webhook URL with Meta's WhatsApp API. Incoming messages will be forwarded to your agent for processing.

Webhook Configuration

WhatsApp uses webhooks to deliver messages and status updates to your agent. The integration handles webhook verification and payload parsing automatically.

Webhook URL

Generated automatically when you link the integration to an agent:

https://your-domain.com/api/whatsapp/webhook/{agent_id}

Webhook Events

The integration subscribes to the following WhatsApp webhook events:

EventDescription
messagesIncoming text, image, document, or interactive messages
message_deliveriesDelivery receipts for sent messages
message_readsRead receipts when the user opens a message
message_errorsDelivery failure notifications with error codes

Verification Token

Meta sends a verification request when configuring the webhook. The integration handles this automatically with a securely generated verification token.

24-Hour Messaging Window

WhatsApp enforces a 24-hour customer service window for free-form messaging. After 24 hours from the user's last message, you can only send templated messages. The integration tracks this window and routes responses appropriately.

Message Templates

WhatsApp requires pre-approved message templates for proactive outreach and messages sent outside the 24-hour customer service window.

Creating Templates

Create and submit templates through the Meta Business Manager. Templates must be approved before they can be sent.

  1. In Meta Business Manager, go to WhatsApp > Message Templates
  2. Click Create Template
  3. Choose a category (Marketing, Utility, or Authentication)
  4. Define the template content with variable placeholders
  5. Submit for review (approval typically takes 24-48 hours)

Template Variables

Use {{1}}, {{2}}, etc., for variable substitution:

When sending via the API, provide the variable values as an array:

Template Approval Rules

Templates are reviewed against WhatsApp's commerce and business policies. Marketing templates require explicit opt-in from users. Utility templates (order updates, account notifications) have faster approval times. Authentication templates are for one-time passwords only.

Testing

Validate your WhatsApp integration before going live.

Webhook Verification

Use the Meta webhook tester or send a test message to verify end-to-end flow:

  1. Send a WhatsApp message to your business number
  2. Check that the agent responds within seconds
  3. Verify the response appears in the WhatsApp chat
  4. Check the Sessions dashboard for the conversation log

Template Testing

Test approved templates before sending to customers:

  1. Navigate to WhatsApp > Message Templates in Meta Business Manager
  2. Find your approved template
  3. Click Send Test and enter a recipient number
  4. Verify the rendered template appears correctly

Common Issues & Troubleshooting

Messages not being received

Verify the webhook URL is correctly registered in Meta Business Manager. Check that your agent is in Active status.

Template send failure

Ensure the template is approved and the recipient has opted in. Verify that variable substitutions match the template exactly.

Rate limit errors

WhatsApp API enforces rate limits per phone number. The integration handles retry logic with exponential backoff.

End-to-End Test Checklist

  • Send a text message and verify the agent responds
  • Send an image message and verify the agent acknowledges it
  • Verify conversation appears in the Sessions dashboard
  • Test message template with sample variable values
  • Verify delivery receipts appear (delivered/read)