Skip to content

CX Instagram

In order to integrate with Instagram, it's needed to create a Facebook App and connect an Instagram professional account to a Facebook page.

We recommend Instagram via Facebook Login as documented below for current self-hosted deployments. Note that Meta is migrating new integrations to Instagram Business Login going forward, so this flow may be deprecated in future CX versions.

Prerequisites

  • A valid Facebook account
  • A valid Facebook page
  • A valid Instagram professional account (Business or Creator)

Facebook App

Go to Facebook Developer Portal: https://developers.facebook.com

cx_facebook_home.png

Create App

Press the Create App button.

cx_facebook_create_app.png

Select Other.

facebook_app_other.png

Select Business as the app type.

facebook_select_type_bussiness.png

Complete the form:

  • App name
  • Contact email
  • Do not select a Business Manager account

facebook_app_complete_form.png

If you already created a Facebook App for CX Facebook Messenger, you can reuse the same app for Instagram — a single app supports both channels. In that case, skip the Create App step and continue with the configuration below.

Provide App ID and App Secret

Provide App ID and App Secret to the platform administrators.

cx_facebook_config_app_settings_basic.png

Note for administrators:

IG_VERIFY_TOKEN=You must generate a token to use here which will be used later for callbacks
FB_APP_SECRET=App Secret
FB_APP_ID=App ID

The CX Channels server must be restarted after updating these environment variables.

Configure App

Add App Domain

In the app settings, add the CX Channels URL domain as your app domain. Consult with the administrator the CX Channels URL domain to fill here.

cx_instagram_app_domain.png

Add Product: Instagram Graph API

Add the Instagram Graph API product from the Facebook app dashboard.

cx_instagram_product.png

Configure Webhooks

Go to app settings and select Webhooks. Choose Instagram and click Subscribe to this object.

cx_instagram_webhooks.png

Complete with:

  • Callback URL: https://<url_cx_channels>/webhooks/instagram
  • Verify token: the IG_VERIFY_TOKEN generated above

cx_instagram_webhook_url.png

Configure Callback Subscriptions

Under Webhook > Instagram, click Edit subscriptions and subscribe to:

  • messages
  • message_reactions
  • messaging_seen

cx_instagram_subscription.png

Connect the Facebook Page with the Instagram Account

Go to Facebook Pages, select your page and open the Settings.

cx_instagram_facebook_page_settings.png

Go to Linked accounts and connect your Instagram professional account.

cx_instagram_facebook_connect_instagram.png

Select the option Business.

cx_instagram_connect_facebook.png

Select the Instagram account category.

cx_instagram_select_category.png

If everything is okay, you will see the message "Instagram connected."

cx_instagram_connect_success.png

Create Instagram Inbox in CX

Head over to CX Channels and create a Messenger inbox for Instagram. From now on, any message received on the linked Instagram account will be routed to your Facebook page and forwarded to the CX inbox.

Facebook Verification

Before going to production, Facebook will not deliver real Instagram messages to CX. Your app must be reviewed and granted advanced access to the required permissions.

  1. Go to App Review -> Requests
  2. Click on Request Permissions or Features

cx_facebook_requests.png


On App Review -> Permissions and Features click on Request advanced access on:

  • instagram_manage_messages
  • instagram_basic
  • pages_show_list
  • pages_manage_metadata
  • pages_messaging
  • business_management
  • pages_read_engagement (required for Facebook App version 7.0 or higher)

Then click on Continue requests.

cx_facebook_continue.png

Select yes on the modal asking about enable multiple business clients.

cx_facebook_permission_type.png


Go to Requests and submit the request for the advanced access permissions above.

cx_facebook_requests_app_review.png

A business verification is required.

cx_facebook_business_verification.png

cx_facebook_business_verification_start.png

If your Facebook App is already verified for CX Facebook Messenger, you only need to request the Instagram-specific permissions (instagram_manage_messages and instagram_basic) — the page-level permissions are shared with the Messenger channel.