Instagram DM Integration
How to Connect Instagram DM to NIVA — Messaging Integration Guide
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
Create a Meta Developer App
- Go to https://developers.facebook.com and log in
- Click My Apps → Create App
- Select Business as the app type
- Enter a name and contact email → Create App
Add Instagram Product
- In your app dashboard → Add a Product
- Find Instagram and click Set up
- Connect your Instagram Business account following the prompts
Generate a Page Access Token
- Go to Instagram → API Setup with Instagram Login or API Setup
- Generate a User Token with
instagram_basic,instagram_manage_messagesscopes - Convert to a long-lived token for production (expires in 60 days otherwise)
For production use a System User token — it does not expire.
Get App Secret
- In your app dashboard → Settings → Basic
- Copy the App Secret
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.
Subscribe to Webhooks
- In your app dashboard → Webhooks → Add 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
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.
Ready to connect Instagram DM?
Open your NIVA botmaster → Omnichannel → Configure