Skip to main content

Instagram Integration

🔹 Before App Installation

Pre-Installation Checklist

Complete these steps before proceeding with the installation.

📸 Instagram Integration

ℹ️ Note: Leave these fields blank if you don't want to use Instagram now. You can configure it later.

Option 1: Set Up Later

Run this command on your server when ready:

INSTAGRAM_APP_ID='your_instagram_app_id' \
INSTAGRAM_APP_SECRET='your_instagram_app_secret' \
INSTAGRAM_CONFIGURATION_ID='your_instagram_config_id' \
INSTAGRAM_VERIFY_TOKEN='your_instagram_verify_token'

Option 2: Set Up Now

Follow the configuration instructions below.

🔧 Step 1: Locate Configuration File

  1. Open the web-server.env file in the installation folder provided by WhautoChat.
  2. Update the following Instagram integration settings:
# Instagram Integration
INSTAGRAM_APP_ID="your_instagram_app_id"
INSTAGRAM_APP_SECRET="your_instagram_app_secret"
INSTAGRAM_CONFIGURATION_ID="your_instagram_configuration_id"
INSTAGRAM_VERIFY_TOKEN="your_instagram_verify_token" # Any random string

Instagram integration

🧩 Step 2: Create a Meta Business Portfolio

Skip this step if you already have a Meta Business Suite account.

  1. Go to business.facebook.com
  2. Log in with your Facebook account
  3. 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.

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

Meta App

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

Create Meta App

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

App Details

  1. Under "Use Cases", select Other → Click Next

App Use Cases

  1. Choose Business as the App Type → Click Next

Choose Business

  1. Select your Meta Business Account → Click Create App

Create App

🔑 Step 4: Get App ID & App Secret

  1. In the left sidebar, go to Settings > Basic
  2. Update required info (App domain, Privacy Policy, etc.)
  3. Click Save Changes
  4. Copy these values:
    • App ID → Paste into INSTAGRAM_APP_ID
    • App Secret → Paste into INSTAGRAM_APP_SECRET

App ID and Secret

⚙️ Step 5: Configure Instagram Login

Already done for Messenger or WhatsApp? Skip to Step 6.

  1. Go to the Dashboard
  2. Scroll to "Facebook Login for Business" → Click Set Up

Facebook Login

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

Login with JavaScript

� Step 6: Create Instagram Configuration

  1. Go to Configuration → Click Create Configuration

Create Configuration

  1. Name it (e.g., "Instagram") → Click Next

Instagram Configure

  1. Choose General login variation → Click Next

Login Variation

  1. Select User Access Token → Click Next

User Access Token

  1. Enable these permissions:
    • pages_messaging
    • pages_show_list
    • pages_manage_metadata
    • business_management
    • instagram_basic
    • instagram_manage_messages
  2. Click Create

Instagram Permissions

  1. Copy the generated Configuration ID → Paste into INSTAGRAM_CONFIGURATION_ID

Configuration ID

🔑 Step 7: Set Instagram Verify Token

  1. Generate a random string using random.org/strings
  2. Copy any of one generated string

Random Verification

  1. Update in your configuration:
    INSTAGRAM_VERIFY_TOKEN="your_random_string_here"
    Example: INSTAGRAM_VERIFY_TOKEN="2AqYO0vP0M"

✅ Final Configuration

Your complete .env configuration should look like this:

# Instagram Integration
INSTAGRAM_APP_ID="112233445566778"
INSTAGRAM_APP_SECRET="a1b2c3d4e5f6g7h8i9j0"
INSTAGRAM_CONFIGURATION_ID="9988776655443322"
INSTAGRAM_VERIFY_TOKEN="2AqYO0vP0M"

⚠️ Important: Instagram configuration is required if you want to offer Instagram Messaging to your customers. Without this, the Instagram channel cannot be connected.


🔹 After App Installation

Post-Installation Configuration

📸 Instagram Webhook Configuration

⚠️ Important: Webhook configuration is mandatory after installation. Without it, Instagram messaging will not work.

🔧 Step-by-Step Instructions

✅ 1. Open Your Meta App

  1. Go to developers.facebook.com
  2. Log in with your Meta developer account
  3. Click My Apps (top-right) and select your app

Open Your Meta App

⚙️ 2. Set Up Webhook for Instagram

  1. In the Dashboard, scroll to the Messenger section
  2. Click Set Up
  3. Navigate to Instagram Settings
  4. Under Webhooks, click Add Callback URL

Instagram Webhook

  1. Enter these details:
  • Callback URL:
https://yourserverdomain.com/instagram/webhook

Replace yourserverdomain with the domain you configured during license installation.

backend server url

Example: https://core.example.com/instagram/webhook

  • Verify Token: Use the same value from your .env file (INSTAGRAM_VERIFY_TOKEN) Example: 2AqYO0vP0M

Callback URL

  1. Click Verify and Save

📡 3. Subscribe to Webhook Fields

In the Webhook Fields section, enable Subscribed for:

  • messages
  • messaging_postbacks
  • messaging_seen
  • messaging_handover
  • message_reactions
  • messaging_referral
  • messaging_optins
  • comments
  • live_comments

Webhook Fields

✅ 4. Finalize in WhautoChat

  1. Go to your self-hosted WhautoChat app
  2. Complete the Instagram Integration setup
  3. Send a test message to verify the connection

💡 Summary of Required Values

INSTAGRAM_VERIFY_TOKEN="2AqYO0vP0M" INSTAGRAM_WEBHOOK_URL="https://yourserverdomain.com/instagram/webhook"

Need Help?

📩 Contact us at [email protected] – we're happy to help!

Additional Resources

For advanced features or troubleshooting, refer to Meta's documentation or WhautoChat support.