Messenger Integration
🔹 Before App Installation
Pre-Installation Checklist
Complete these steps before proceeding with the installation.
💬 Messenger Integration
ℹ️ Note: Leave these fields blank if you don't want to use Messenger now. You can configure it later.
Option 1: Set Up Later
Run this command on your server when ready:
MESSENGER_APP_ID='your_messenger_app_id' \
MESSENGER_APP_SECRET='your_messenger_app_secret' \
MESSENGER_CONFIGURATION_ID='your_messenger_config_id' \
MESSENGER_VERIFY_TOKEN='your_messenger_verify_token'
Option 2: Set Up Now
Follow the configuration instructions below.
🛠 Step 1: Locate Configuration File
- Open the
web-server.envfile in the installation folder provided by WhautoChat. - Update the following Messenger integration settings:
# Messenger Integration
MESSENGER_APP_ID="your_messenger_app_id"
MESSENGER_APP_SECRET="your_messenger_app_secret"
MESSENGER_CONFIGURATION_ID="your_messenger_configuration_id"
MESSENGER_VERIFY_TOKEN="your_messenger_verify_token" # Any random string

🧩 Step 2: Create a Meta Business Portfolio
⏩ Skip this step if you already have a Meta Business Suite account.
- Go to business.facebook.com
- Log in with your Facebook account
- Create a Meta Business Suite account to generate your business portfolio
👨💻 Step 3: Create a Facebook Developer App
⏩ Already have a Meta App for WhatsApp or Messenger? Skip to Step 4.
- Go to Facebook Developers
- Log in or sign up for a Developer account
- Click "My Apps" in the top-right corner, then "Create App"

- In the dialog, click the Create App button (top right)

- Enter the app details:
- App Name (e.g., "ABC Business")
- App Contact Email
- Click Next

- Under "Use Cases", select Other → Click Next

- Choose Business as the App Type → Click Next

- Select your Meta Business Account → Click Create App

🔑 Step 4: Get App ID & App Secret
- In the left sidebar, go to Settings > Basic
- Update required info (App domain, Privacy Policy, etc.)
- Click Save Changes
- Copy these values:
- App ID → Paste into
MESSENGER_APP_ID - App Secret → Paste into
MESSENGER_APP_SECRET
- App ID → Paste into

⚙️ Step 5: Get Messenger Configuration ID
- Go to the Dashboard
- Scroll to "Facebook Login for Business" → Click Set Up

- Under Settings, enable Login with the JavaScript SDK
- Add your self-hosted app domain (e.g.,
https://yourappdomain.com/) - Click Save

- Go to Configuration → Click Create Configuration

- Name it (e.g., "Messenger") → Click Next

- Choose General login variation → Click Next

- Select User Access Token → Click Next

- Enable these permissions:
pages_messagingpages_show_listpages_manage_metadatabusiness_management
- Click Create

- Copy the generated Configuration ID → Paste into
MESSENGER_CONFIGURATION_ID

🧪 Step 6: Set Messenger Verify Token
- Generate a random string using random.org/strings

- Copy any of one generated string
- Update in your configuration:
Example:
MESSENGER_VERIFY_TOKEN="your_random_string_here"MESSENGER_VERIFY_TOKEN="2AqYO0vP0M"
✅ Final Configuration
Your complete .env configuration should look like this:
# Messenger Integration
MESSENGER_APP_ID="112233445566778"
MESSENGER_APP_SECRET="a1b2c3d4e5f6g7h8i9j0"
MESSENGER_CONFIGURATION_ID="9988776655443322"
MESSENGER_VERIFY_TOKEN="2AqYO0vP0M"
⚠️ Important: Messenger setup is required if you plan to let your clients use Messenger in their communication channels. Without this, Messenger will not be available.
🔹 After App Installation
Post-Installation Configuration
💬 Messenger Webhook Configuration (Self-Hosted Setup)
⚠️ Important: Webhook configuration is mandatory after installation. Without it, Messenger messaging will not work.
🔧 Step-by-Step Instructions
✅ 1. Open Your Meta App
- Go to developers.facebook.com
- Log in with your Meta developer account
- Click My Apps (top-right) and select your app

⚙️ 2. Set Up Messenger
- In the Dashboard, scroll to the Messenger section
- Click Set Up

🌐 3. Configure Webhooks
In the Messenger API Settings:
- Callback URL:
https://yourserverdomain.com/messenger/webhook
Replace yourserverdomain with the domain you configured during license installation.

Example: https://core.example.com/messenger/webhook
-
Verify Token: Use the same value from your
.envfile (MESSENGER_VERIFY_TOKEN)Example:
2AqYO0vP0M -
Click Verify and Save

🔔 4. Subscribe to Webhook Fields
In the Webhook Fields section, enable Subscribed for:
messagesmessage_readsmessaging_postbacksmessaging_optinsmessaging_referrals

✅ 5. Finalize in WhautoChat
- Go to your self-hosted app panel
- Complete Messenger Integration
- Send a test message to verify everything works
💡 Summary of Required Values
MESSENGER_VERIFY_TOKEN="2AqYO0vP0M" MESSENGER_WEBHOOK_URL="https://yourserverdomain.com/messenger/webhook"
Need Help?
📩 Contact us at [email protected] – we're happy to help!
Additional Resources
For advanced features or troubleshooting, refer to Facebook's documentation or WhautoChat support.