Skip to main content

Instagram

Instagram Splash

info

If your Meta developer app is in Development mode and NOT Live mode, you will need to add your testing instagram account (i.e. the account that you are using to send messages into Instagram Business Account) into Meta Apps

Required Variables

  1. INSTAGRAM_STUDIO_FLOW_SID (Guide)
  2. INSTAGRAM_APP_SECRET
  3. INSTAGRAM_PAGE_ACCESS_TOKEN
  4. INSTAGRAM_WEBHOOK_VERIFY_TOKEN

Setup

  1. Ensure you have the following before proceeding
    • An Instagram Professional account (Guide)
    • A Facebook Page connected to that account (Guide)
    • A Facebook Developer account that can perform Tasks with atleast "Moderate" level access on that Page (Guide)
    • A registered Facebook App with Basic settings configured (Guide)
  2. Login to Meta Developer Console
  3. Select your Meta developer app that is managing your Facebook Page
  4. Under Add products to your app, click Set up for Messenger
  5. Obtain the value for INSTAGRAM_APP_SECRET which is under Settings > Basic
    • Instagram App Secret
  6. Obtain the value for INSTAGRAM_PAGE_ACCESS_TOKEN which is under Messenger > Instagram Settings > Access Token. Click the Generate token button.
    • Instagram Page Access Token
  7. Obtain the value for INSTAGRAM_WEBHOOK_VERIFY_TOKEN which is under Messenger > Instagram Settings > Webhooks. The verify token is a self-inserted value and can be any freeform text.
    • Instagram Webhook Verify Token
info

Ensure that you have obtained all the necessary values for the variables stated in Required Variables

Configure Incoming Webhook

  1. Ensure you have deployed Conversations Adapters into your Twilio Flex account
  2. Ensure you are logged into Meta Developer Console
  3. Select your Meta developer app
  4. Under Messenger > Instagram Settings, insert your deployed incoming webhook. For the Verify token, insert any random string that you wish. You will need the value of Verify token as you will need to insert them into GitHub Environments - Secrets or your .env file.
    • For Subscriptions, you only need messages.
    • The Conversations Adapters incoming webhook URL should be in the format of https://twilio-flex-conversations-adapters-<RANDOMNUMBER>-dev.twil.io/api/instagram/incoming
    • Instagram Webhook