All integrations

Instagram DM Integration

How to Connect Instagram DM to NIVA · Messaging Integration Guide

20–30 minutesMedium7 steps

Connect NIVA to Instagram so your AI bot automatically replies to Direct Messages. NIVA uses the Meta Messenger Platform webhook · the same infrastructure used by Facebook Messenger · with HMAC-SHA256 signature verification for security.

Before you begin

  • NIVA botmaster account with a bot configured
  • Instagram Business or Creator account
  • Facebook Page linked to your Instagram account
  • Meta Developer account (free)

Step-by-step setup

  1. 1

    Create a Meta Developer App

    • Go to https://developers.facebook.com and log in
    • Click My AppsCreate App
    • Select Business as the app type
    • Enter a name and contact email → Create App
  2. 2

    Add Instagram Product

    • In your app dashboard → Add a Product
    • Find Instagram and click Set up
    • Connect your Instagram Business account following the prompts
  3. 3

    Generate a Page Access Token

    • Go to InstagramAPI Setup with Instagram Login or API Setup
    • Generate a User Token with instagram_basic, instagram_manage_messages scopes
    • Convert to a long-lived token for production (expires in 60 days otherwise)
    For production use a System User token · it does not expire.
  4. 4

    Get App Secret

    • In your app dashboard → SettingsBasic
    • Copy the App Secret
  5. 5

    Configure in NIVA Botmaster

    • Open your NIVA botmaster → Omnichannel
    • Click Configure on the Instagram DM card
    • Paste Page Access Token, App Secret
    • Enter a Verify Token · any secret string you choose
    • Click Save & Activate
    • Copy the Webhook URL
    Remember your Verify Token · you need it in the next step.
  6. 6

    Subscribe to Webhooks

    • In your app dashboard → WebhooksAdd Subscriptions
    • Select Instagram object
    • Paste your NIVA Webhook URL into Callback URL
    • Paste your Verify Token into Verify Token
    • Click Verify and Save
    • Check the messages checkbox in subscriptions
    • Click Save
  7. 7

    Test the Integration

    • Send a DM to your Instagram Business account from another account
    • The bot should reply within 2–3 seconds

Troubleshooting

Webhook verification fails
Verify Token mismatch · make sure you pasted the same token in both NIVA and Meta.
No reply to DMs
Check messages subscription is checked in the webhook settings.
Token expired
Short-lived tokens expire in 1 hour. Use a long-lived or System User token.
403 on webhook POST
App Secret wrong · re-copy from Settings → Basic.