WhatsApp Integration
πΉ Before App Installationβ
Pre-Installation Checklistβ
Complete these steps before proceeding with the installation.
π¬ WhatsApp Setup Guide (Reseller SaaS License)β
Set up WhatsApp integration for your Reseller SaaS using WhautoChat.
π Step 0: Locate Configuration Fileβ
- Navigate to the
web-server.envfile in the installation folder provided by the WhautoChat team. - Update the following WhatsApp integration settings:
# WhatsApp Integration
WHATSAPP_APP_ID="your_whatsapp_app_id"
WHATSAPP_APP_SECRET="your_whatsapp_app_secret"
WHATSAPP_CONFIGURATION_ID="your_whatsapp_configuration_id"
WHATSAPP_APP_TOKEN="your_whatsapp_app_token"
# Generate a random string for webhook validation at:
# https://www.random.org/strings/?num=10&len=10&digits=on&upperalpha=on&loweralpha=on&unique=on
WHATSAPP_VERIFY_TOKEN="your_whatsapp_verify_token"

π Note: For Business License users, WhatsApp can be configured directly within the platform. These steps are optional for them.
π§© Step 1: Create a Meta Business Portfolioβ
If you already have a Meta Business Suite account, skip this step.
- Go to business.facebook.com
- Log in with your Facebook account
- Create a Meta Business Suite account β this will generate your business portfolio
π¨βπ» Step 2: Register as a Meta Developerβ
- Go to developers.facebook.com
- Log in or sign up for a Developer account
- Click on "My Apps" in the top-right corner, then click "Create App"

- Click the Create App button in the top-right corner

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

- Use Cases: Select Other β Click Next

- App Type: Select Business option β Click Next

- Business Portfolio: Choose your Meta Business Account β Click Create App

βοΈ Step 3: Update App Settingsβ
- Go to App Settings β Basic
- Update:
- App Icon
- Privacy Policy & Terms URLs
- App Category
- Platform details (if needed)
- Click Save Changes

Note: Be sure to save your changes. You can add additional information if you wish, but the information above is the only information required to complete the remaining steps.
π Step 4: Get App ID and App Secretβ
- In your Meta app, go to Settings > Basic
- Copy the App ID and App Secret:
- App ID β paste into WHATSAPP_APP_ID
- App Secret β paste into WHATSAPP_APP_SECRET
- Update your (web-server.env) file with these values.

βοΈ Step 5: Configure WhatsApp Loginβ
- Go to Dashboard β Scroll to Facebook Login for Business β Click Set Up

- In Settings, enable Login with JavaScript SDK
- Add your self-hosted app domain Eg. https://yourappdomain.com/
- Click Save Changes

π Step 6: Create WhatsApp Configurationβ
- Go to Configuration β Click Create Configuration

- Name it (e.g., WhatsApp) β Click Next

- Login Variation: Choose WhatsApp Embedded Signup β Click Next β οΈ Make sure your Meta Business is verified β required to access this option.

- Token Expiration: Select Never β Click Next

- Choose Products: Select WhatsApp Cloud API only Click Next.

- Choose Assets:
- Select WhatsApp Accounts
- Asset Task Permissions (Select all):
- manage
- develop
- manage_templates
- view_phone_assets
- manage_phone_assets
- view_templates
- Messaging

- Select below mentioned 3 Permissions and click Create.
- whatsapp_business_management
- business_management
- Whatsapp_business_messaging

β WhatsApp Configuration is now created. Copy the Configuration ID β Paste into WHATSAPP_CONFIGURATION_ID Update your (web-server.env) file with this value.
π Step 7: Generate WhatsApp App Tokenβ
- Go to https://business.facebook.com/settings and select your business portfolio to continue
- In the left panel, under Users, click System Users β Click Add

- Create System User:
- Enter Name (e.g., abc-business)
- Role: Select Admin (Or) Employee β Click Create

- Click Assign Assets:
- Select your Meta App β Enable Full Control (Manage App) β Click Assign Assets

- Scroll up β Click Generate Token

- Generate Token:
- Select your Meta App Eg. ABC Business β Click Next

- Token Expiration: Select Never β Click Next

- Select below mentioned 3 Permissions:
- whatsapp_business_management
- Whatsapp_business_messaging
- business_management
- Click Generate Token

- π Copy the generated Token β paste into WHATSAPP_APP_TOKEN
- Update your (web-server.env) file with this value.

π§ͺ Step 8: Set WhatsApp Verify Tokenβ
- The Verify Token can be any random string.
- To generate one quickly, visit:π https://www.random.org/strings
- Youβll see a list of randomly generated strings.
- Copy any one of them and update it in your WhatsApp configuration list.
Example: 2AqYO0vP0M
β paste into WHATSAPP_VERIFY_TOKEN
β Step 9: Update Your .env Fileβ
Hereβs how your final configuration should look:
WhatsApp Integration
WHATSAPP_APP_ID="112233445566778"
WHATSAPP_APP_SECRET="a1b2c3d4e5f6g7h8i9j0"
WHATSAPP_CONFIGURATION_ID="9988776655443322"
WHATSAPP_APP_TOKEN="EAAJZCZA2wZA1cUBABAZCZA3UZBvE4fWQ4BbZA1ZCZAUZBZCwZCmIvW8uZAJZChq4ZAzA2ZAedFZBG0UQZDZD"
WHATSAPP_VERIFY_TOKEN="2AqYO0vP0M"
πΉ After App Installationβ
Post-Installation Configuration: Finalize Your Setup
π¬ WhatsApp Webhook Configuration (Reseller SaaS License)β
β οΈ Important: Webhook configuration is mandatory and must be done only after installing the app. If skipped, WhatsApp incoming/outgoing messages will not work.
π§ Step-by-Step Guideβ
β Step 1: Open Your Meta Developer Appβ
- Visit https://developers.facebook.com
- Log in to the Facebook account used for your Meta app setup
- Click My Apps (top-right corner)
- Select your existing Meta App (e.g., ABC Business)

βοΈ Step 2: Configure Webhook for WhatsAppβ
- In the WhatsApp menu:
- Go to the Configuration section
- In the Webhook Configuration Modal:
- Callback URL: https://yourserverdomain.com/whatsapp/webhook
- Verify Token: Use the token from your .env file β WHATSAPP_VERIFY_TOKEN Example: 2AqYO0vP0M
- Click Verify and Save

π‘ Step 3: Subscribe to Webhook Fieldsβ
- Enable the Subscribed toggle for the following 4 webhook fields:
- message_template_status_update
- messages
- smb_message_echoes
- template_category_update

β Step 4: Finalize Setup in WhautoChatβ
- Go to your self-hosted Installed WhautoChat app
- Complete the WhatsApp Integration
- Send a test message to verify the webhook connection
Additional Resourcesβ
For advanced features or troubleshooting, refer to your WhatsApp API provider's documentation or WhautoChat support.