How to configure WhatsApp Integration
- How to configure WhatsApp Integration
- WhatsApp for Business Setup Guide
- Prerequisites
- Step-by-Step Setup Process
- 1. Create a Meta Business App
- 2. Add WhatsApp Product to Your App
- 3. Create a System User and Generate Access Token
- 4. Add System User to WhatsApp Business Account
- 5. Gather information to enter into ChatLab
- 6. Configure ChatLab Integration
- 7. Configure Webhooks
- Verification and Testing
- Test Your Integration
- Common Issues and Troubleshooting
- "Invalid Access Token" Error
- Webhook Verification Fails
- Messages Not Sending/Receiving
- Common Configuration Errors
- Important Notes
- Support
WhatsApp for Business Setup Guide
This guide will walk you through setting up WhatsApp Business integration with your ChatLab bot. The integration allows your bot to send and receive messages through WhatsApp Business API.
Prerequisites
Before starting, ensure you have:
- A Meta Business Manager account
- Admin access to your business portfolio
- WhatsApp business account
- A verified business phone number
- ChatLab subscription that includes WhatsApp integration (Standard Plan+)
Step-by-Step Setup Process
1. Create a Meta Business App
- Go to Meta for Developers
- Click "My Apps" → "Create App"
- Provide a name like ‘ChatLab WhatsApp’
- Select ‘Other’ as use case in next step
- Select "Business" as the app type
- Fill in your app details:
- App Name
- App Contact Email
- Business portfolio (select your business) - you need to select one
- Click "Create App"
2. Add WhatsApp Product to Your App
- In your app dashboard, find WhatsApp
- Find "WhatsApp" and click "Set Up"
- Follow the setup wizard to configure WhatsApp Business API
3. Create a System User and Generate Access Token
- Go to Meta Business Settings
- Navigate to "Users" → "System Users"
- Click "Add" to create a new system user
- Enter a name (e.g., "ChatLab Integration")
- Select "Admin" role
- Click "Create System User"
- Select user and click “Assign assets”
- Select the App you created in step 1 and select “Full controll”
Generate the Access Token:
- Click on your newly created system user
- Click "Generate New Token"
- Select your app from the dropdown
- Select expiration : choose Never
- Add these permissions:
business_management
whatsapp_business_management
whatsapp_business_messaging
- Click "Generate Token"
- Important: Copy and securely store this token - you'll need it for ChatLab
4. Add System User to WhatsApp Business Account
- In Business Settings, go to "Accounts" → "WhatsApp Accounts"
- Select your WhatsApp Business Account
- Click the "WhatsApp Account Access" tab
- Click "Add People"
- Add your system user with "Full control"
5. Gather information to enter into ChatLab
You'll need to collect the following information for ChatLab:
Access Token
- The token you generated in Step 3
- This authenticates your application with WhatsApp Business API
Phone Number ID
- In your Meta app dashboard, go to WhatsApp → "API Setup"
- Find your test phone number or add a production phone number
- Copy the Phone Number ID (not the actual phone number)
Business Account ID
- In your Meta app dashboard, go to WhatsApp → "API Setup"
- Find Business Account ID - it is displayed next to the Phone number ID
Webhook Verify Token
- Prepare a random string that will be used by WhatsApp as your individual key, a password that you will provide both to ChatLab in Step 6 and later to WhatsApp/Meta configuration in Step 7
6. Configure ChatLab Integration
Once you have all the required parameters from Meta, follow these steps to configure the integration in ChatLab:
- Log into ChatLab Admin Panel, select the bot and go to Connect tab
- Navigate to WhatsApp
- Enable Integration and provide required details
- Access token (Step 3)
- Phone number ID (Step 5)
- Webhook Verify Token (Step 5)
- Business Account ID (Step 5)
Click Save/Update and continue to Step 7
7. Configure Webhooks
- In your Meta app dashboard, go to WhatsApp → "Configuration"
- In the Webhook section, click "Edit"
- Enter your webhook details:
- Callback URL: https://api.chatlab.com/aichat/whatsapp/webhook (use this URL)
- Webhook Verify Token: The custom token you created in Step 5
- In next step select Whatsapp Business account as product and finish off the configuration: subscribe to these webhook fields:
messages
message_deliveries
(if available)message_reads
(if available)messaging_optins
(if available)messaging_optouts
(if available)- Click "Verify and Save"
Verification and Testing
Test Your Integration
- Send a test message to your WhatsApp Business number
- Verify that:
- Messages are received in ChatLab
- Your bot responds appropriately
- Messages appear correctly in WhatsApp
Common Issues and Troubleshooting
"Invalid Access Token" Error
- Verify the token was copied correctly
- Ensure all required permissions were granted
- Check that the system user has access to the WhatsApp Business Account
Webhook Verification Fails
- Confirm the verify token matches exactly
- Check that the webhook URL is accessible
- Ensure your ChatLab subscription includes WhatsApp features
Messages Not Sending/Receiving
- Verify the Phone Number ID is correct
- Check Business Account ID
- Ensure webhook subscriptions are active
- Review WhatsApp Business API rate limits
Common Configuration Errors
"Invalid Access Token"
- ✓ Verify token was copied completely
- ✓ Check token permissions include all required scopes
- ✓ Ensure system user has access to WhatsApp Business Account
- ✓ Confirm token hasn't expired
"Phone Number ID Not Found"
- ✓ Use the Phone Number ID, not the actual phone number
- ✓ Ensure phone number is added to your Meta app
- ✓ Verify phone number is verified in WhatsApp Business
"Webhook Verification Failed"
- ✓ Verify token matches exactly between ChatLab and Meta
- ✓ Check for extra spaces or hidden characters
- ✓ Ensure webhook URL is configured in Meta
"Business Account Access Denied"
- ✓ Confirm system user has access to the Business Account
- ✓ Check Business Account ID is correct
- ✓ Verify account permissions in Meta Business Settings
Important Notes
- Rate Limits: WhatsApp Business API has rate limits (200 calls/hour by default, 5000 for active accounts)
- Phone Number Verification: Your business phone number must be verified with WhatsApp
- Template Messages: For outbound messages outside of 24-hour response window, you may need approved message templates
- Security: Keep your access token and verify token secure and never share them publicly
Support
If you encounter issues during setup:
- Check the Meta WhatsApp Business API documentation
- Contact ChatLab support with:
- Your Business Account ID
- Error messages (without exposing tokens)
- Steps you've already tried