Sandra
account_circle
arrow_backAdmin Guides
~20 min setup

Connect Instagram

Let users interact with Sandra through Instagram Direct Messages — text, images, and voice messages.

Capabilities

DM conversationsFull AI conversations via Instagram Direct Messages
Image understandingUsers send photos — Sandra analyzes them with vision AI
Voice messagesUsers send audio — Sandra transcribes and responds
Identity linkingLink Instagram account to Sandra profile for personalization
Prerequisites: An Instagram Business or Creator account (not personal), a Meta Business Account, and access to the Meta Developer Console. If you already have a Meta App from WhatsApp setup, you can reuse it.

1. Convert to a business account (if needed)

1
Open Instagram → Settings → Account
2
Tap Switch to Professional Account → select Business
3
Connect to your Facebook / Meta Business Page

2. Set up the Meta app

1
Create a Meta App (or reuse your WhatsApp app) at developers.facebook.com/apps
2
From the app dashboard, click Add Product → find InstagramSet Up
3
Connect your Instagram Business Account when prompted

3. Generate an access token

2
Create (or reuse) a system user → click Generate Token
3
Add permissions: instagram_basic, instagram_manage_messages, pages_messaging, pages_manage_metadata
4
Click Generate Token and copy it

4. Set up the webhook

1
In your Meta app → Instagram → Webhooks Edit Subscription
2
Callback URL: https://<your-sandra-url>/api/channels/instagram
3
Verify Token: A secret string you choose
4
Subscribe to messages and messaging_postbacks

5. Configure Sandra

Option A: Environment variables

env
INSTAGRAM_ACCESS_TOKEN=EAAxxxxxxx...
INSTAGRAM_VERIFY_TOKEN=sandra-ig-verify-2026
INSTAGRAM_APP_SECRET=abcdef123456...
INSTAGRAM_API_VERSION=v19.0

Option B: Admin Portal

1
Admin Portal → SettingsInstagram Channel
2
Enter Access Token, Verify Token, and App Secret
3
Click Save

6. Verify

1
Send a DM to your Instagram Business account
2
Sandra should respond within a few seconds
3
Try text, a photo, or a voice message
App Review for production: For users outside your business, your Meta app needs App Review approval for instagram_manage_messages. During development, test with accounts that have a role in your Meta app (Admin, Developer, Tester).

Instagram-specific behavior

  • Formatting: Markdown is automatically stripped — Instagram DMs don’t support rich text
  • Long messages: Automatically split into multiple messages to stay within character limits
  • Identity linking: Same flow as WhatsApp — email verification to link accounts across channels

shieldSecurity notes

  • • Incoming webhooks verified with HMAC-SHA256
  • • Messages deduplicated to prevent double-processing
  • • Messages processed serially per user to maintain conversation coherence
  • • Audio transcribed in-memory — files not stored

← Connect WhatsApp

WhatsApp Business setup.

Connect GitHub →

Repository knowledge indexing.