This guide will walk you through the process of integrating Instagram Messaging with your ChatDash project.

Prerequisites

  • An Instagram Business Account or Instagram Creator Account
  • A Facebook Page connected to your Instagram account
  • A Meta developer account with an app that has the following:
    • Basic Settings configured
    • Messenger product added
    • Instagram messaging enabled for your app

Step 1: Set Up Your Meta App

  1. Go to the Meta for Developers website and log in.
  2. Create a new app or use an existing one.
  3. In your app’s dashboard, add the Messenger product if you haven’t already.
  4. Navigate to “Messenger > Instagram settings” in the left sidebar.

Step 2: Connect Your Facebook Page

  1. In the “Access Tokens” section, click “Add or Remove Pages”.
  2. Select the Facebook Page associated with your Instagram account.
  3. Grant the necessary permissions when prompted.

Step 3: Generate an Access Token

  • After adding your Page, click “Generate Token” next to your Page name.
  • Copy and securely store this token; you’ll need it for ChatDash integration.

Step 4: Enable Message Control Connected Tools Settings

In order to manage Instagram messages via API, Instagram Professional accounts need to enable the connected tools toggle under message control settings:

Instagram Connected Tools

  1. Go to your Instagram Professional account settings.
  2. Navigate to “Privacy” > “Messages” > “Message Controls”.
  3. Find the “Connected Tools” section.
  4. Enable the toggle for “Allow access to messages”.

This step is crucial for allowing external tools (like ChatDash) to manage your Instagram messages through the API.

Step 5: Set Up Webhooks

  1. In the “Webhooks” section of your Meta app, click “Add Callback URL”.
  2. For the Callback URL, enter: https://api.chat-dash.com/integrations/[YOUR_INTEGRATION_ID]
  3. Enter the Verify Token provided in your ChatDash project settings.
  4. Click “Verify and Save”.

Step 6: Subscribe to Webhook Events

  1. After setting up the webhook, click “Edit Subscriptions”.
  2. Select the following fields:
    • messages
    • messaging_postbacks
  3. Click “Save”.

Step 7: Create a ChatDash Integration

  1. In your ChatDash project settings, go to the “Channels” tab.
  2. Click on Instagram’s “Connect” button.
  3. Enter the access token you generated in Step 3 as the Graph API Token.
  4. Click “Create Integration”.

Step 8: Test Your Integration

Before completing the “App Review”, you can only test out your integration with people you can find in App roles -> Roles menu in the left sidebar.
  1. Send a direct message to your Instagram Business account.
  2. If set up correctly, you should see the message processed by ChatDash.

Step 9: Submit for App Review

Before your app can go live and interact with Instagram users other than admins, editors, and testers, you need to submit your app for review:

  1. Go to your app’s dashboard and navigate to “App Review > Requests”.
  2. Request the following permissions:
    • instagram_manage_messages
    • pages_messaging
  3. Provide the necessary information and submit for review.

Troubleshooting

  • Ensure your Instagram account is a Business or Creator account.
  • Verify that your Facebook Page is correctly linked to your Instagram account.
  • Double-check that all required webhooks are properly subscribed.
  • Confirm that the Message Control Connected Tools setting is enabled in your Instagram account.
  • Review Meta’s developer console for any error messages or failed deliveries.

Important Notes