Skip to main content

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​

  1. Navigate to the web-server.env file in the installation folder provided by the WhautoChat team.
  2. 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"

WhatsApp Configuration File

πŸ“ 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.

  1. Go to business.facebook.com
  2. Log in with your Facebook account
  3. Create a Meta Business Suite account β€” this will generate your business portfolio

πŸ‘¨β€πŸ’» Step 2: Register as a Meta Developer​

  1. Go to developers.facebook.com
  2. Log in or sign up for a Developer account
  3. Click on "My Apps" in the top-right corner, then click "Create App"

My Apps

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

Create App

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

App Details

  1. Use Cases: Select Other β†’ Click Next

Use Case

  1. App Type: Select Business option β†’ Click Next

App Type

  1. Business Portfolio: Choose your Meta Business Account β†’ Click Create App

Business Portfolio

βš™οΈ Step 3: Update App Settings​

  1. Go to App Settings β†’ Basic
  2. Update:
  • App Icon
  • Privacy Policy & Terms URLs
  • App Category
  • Platform details (if needed)
  1. Click Save Changes

Update App Settings

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​

  1. In your Meta app, go to Settings > Basic
  2. 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.

App ID and App Secret

βš™οΈ Step 5: Configure WhatsApp Login​

  1. Go to Dashboard β†’ Scroll to Facebook Login for Business β†’ Click Set Up

Facebook Login

  1. In Settings, enable Login with JavaScript SDK

JavaScript SDK

πŸ” Step 6: Create WhatsApp Configuration​

  1. Go to Configuration β†’ Click Create Configuration

Create WhatsApp Configuration

  1. Name it (e.g., WhatsApp) β†’ Click Next

Configuration Name

  1. Login Variation: Choose WhatsApp Embedded Signup β†’ Click Next ⚠️ Make sure your Meta Business is verified β€” required to access this option.

Login Variation

  1. Token Expiration: Select Never β†’ Click Next

Access Token Expiration

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

Choose Product

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

Assests and Permissions

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

WhatsApp Permissions

βœ… 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​

  1. Go to https://business.facebook.com/settings and select your business portfolio to continue
  2. In the left panel, under Users, click System Users β†’ Click Add

System User

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

Create System User

  1. Click Assign Assets:
  • Select your Meta App β†’ Enable Full Control (Manage App) β†’ Click Assign Assets

Assign Assets

  1. Scroll up β†’ Click Generate Token

Generate Token

  1. Generate Token:
  • Select your Meta App Eg. ABC Business β†’ Click Next

Select Meta App

  • Token Expiration: Select Never β†’ Click Next

App Token Expiry

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

App Token Permissions

  • πŸ” Copy the generated Token β†’ paste into WHATSAPP_APP_TOKEN
  • Update your (web-server.env) file with this value.

App Token Generated

πŸ§ͺ 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.

Random Verify Token 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​

  1. Visit https://developers.facebook.com
  2. Log in to the Facebook account used for your Meta app setup
  3. Click My Apps (top-right corner)
  4. Select your existing Meta App (e.g., ABC Business)

Select Meta App

βš™οΈ Step 2: Configure Webhook for WhatsApp​

  1. In the WhatsApp menu:
  • Go to the Configuration section
  1. In the Webhook Configuration Modal:

WhatsApp Webhook Configuration

πŸ“‘ Step 3: Subscribe to Webhook Fields​

  1. Enable the Subscribed toggle for the following 4 webhook fields:
  • message_template_status_update
  • messages
  • smb_message_echoes
  • template_category_update

WhatsApp Webhook Fields

βœ… Step 4: Finalize Setup in WhautoChat​

  1. Go to your self-hosted Installed WhautoChat app
  2. Complete the WhatsApp Integration
  3. 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.