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
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, click "Add Product"
- 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 accessβ
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 Access"
5. Get Required Information
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 β "Getting Started"
- 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 Business Settings, go to "Accounts" β "WhatsApp Accounts"
- Your WhatsApp Business Account ID is displayed at the top of the page
Webhook Verify Token
- Create a custom secure token (e.g., a random string)
- This token will be used to verify webhook requests
- Keep this secure - you'll enter it in both ChatLab and Meta
6. Configure Webhooks
- In your Meta app dashboard, go to WhatsApp β "Configuration"
- In the Webhook section, click "Edit"
- Enter your webhook details:
- Callback URL:
https://your-chatlab-webhook-url
(provided by ChatLab support) - Verify Token: The custom token you created in Step 5
- Subscribe to these webhook fields:
messages
message_deliveries
message_reads
messaging_optins
messaging_optouts
- Click "Verify and Save"
7. Configure ChatLab Integration
Once you have all the required parameters from Meta, follow these steps to configure the integration in ChatLab:
Accessing WhatsApp Integration Settings
- Log into ChatLab Admin Panel
- Go to your ChatLab admin dashboard
- Sign in with your account credentials
- Navigate to Bot Settings
- Select the bot you want to integrate with WhatsApp
- Go to "Settings" β "Integrations"
- Click on "WhatsApp Functions"
WhatsApp Integration Form Fields
Enable WhatsApp Business Integration
- Toggle the "Enable WhatsApp Business integration" switch
- This activates the WhatsApp functionality for your bot
Required Parameters:
- Access Token π
- Field Label: "Access Token"
- Description: WhatsApp Business API access token from Meta for Developers
- Where to get it: Generated in Meta Business Settings β System Users
- Format: Long alphanumeric string (e.g.,
EAABsBCS1234...
) - Security: This field is password-protected with a reveal option (eye icon)
- Validation: Required when WhatsApp integration is enabled
- Phone Number ID π±
- Field Label: "Phone Number ID"
- Description: The ID of the phone number associated with your WhatsApp Business account
- Where to get it: Meta App Dashboard β WhatsApp β Getting Started
- Format: Numeric string (e.g.,
1234567890123456
) - Note: This is NOT your actual phone number, but the ID assigned by Meta
- Validation: Required when WhatsApp integration is enabled
- Webhook Verify Token π
- Field Label: "Webhook Verify Token"
- Description: A custom token you create to verify webhook requests from WhatsApp
- Where to create it: Generate a secure random string (recommended: 32+ characters)
- Format: Custom secure string (e.g.,
mySecureToken123!@#
) - Security: This field is password-protected with a reveal option (eye icon)
- Important: Must match exactly with the token configured in Meta webhook settings
- Validation: Required when WhatsApp integration is enabled
- Business Account ID π’
- Field Label: "Business Account ID"
- Description: The unique identifier for your WhatsApp Business Account
- Where to get it: Meta Business Settings β Accounts β WhatsApp Accounts
- Format: Numeric string (e.g.,
1234567890123456
) - Note: Found in Meta Business Manager, not in the app dashboard
- Validation: Required when WhatsApp integration is enabled
Step-by-Step Configuration Process
- Enable the Integration
- Click the toggle switch to enable
- Additional fields will appear when enabled
- Fill in Access Token
- Paste your Meta-generated access token
- Use the eye icon to reveal/hide the token if needed
- Ensure no extra spaces are included
- Enter Phone Number ID
- Copy the Phone Number ID from your Meta app
- Enter only the numeric ID, not the formatted phone number
- Set Webhook Verify Token
- Enter the same custom token you configured in Meta webhooks
- This must match exactly (case-sensitive)
- Use the eye icon to verify the token if needed
- Add Business Account ID
- Enter the WhatsApp Business Account ID from Meta Business Settings
- This is different from your app ID or phone number ID
- Save Configuration
- Click "Update Chatbot" button
- The button will only be enabled when changes are detected
- Wait for the confirmation message
βοΈ Enable WhatsApp Business integration
Access Token: [β’β’β’β’β’β’β’β’β’β’β’β’β’β’β’β’β’β’β’β’β’β’] ποΈ
Phone Number ID: [1234567890123456]
Webhook Verify Token: [β’β’β’β’β’β’β’β’β’β’β’β’β’β’β’β’β’β’β’β’β’β’] ποΈ
Business Account ID: [1234567890123456]
Configuration Validation
Success Indicators:
- β Green success toast: "Your chatbot is properly integrated with WhatsApp Business."
- β All fields remain filled after saving
- β Integration toggle stays enabled
Error Indicators:
- β Warning toast with error message
- β Integration automatically disabled
- β Red error message displayed
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
Testing the Configuration
- Save the configuration in ChatLab
- Send a test message to your WhatsApp Business number from a personal phone
- Check the conversation logs in ChatLab to confirm message reception
- Verify bot responses appear correctly in WhatsApp
Subscription Requirements
β οΈ Important: If you see the message "This feature is not available in your subscription," you need to:
- Click the "Manage subscription" button
- Upgrade to a plan that includes WhatsApp Business integration
- Return to the integration settings after upgrading
The WhatsApp integration requires a ChatLab subscription tier that includes this feature. Contact support if you're unsure about your plan's capabilities.
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
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
This integration requires a ChatLab subscription that includes WhatsApp Business features. Contact support if this option is not available in your account.