Connect Instagram
The connect flow takes about 30 seconds. You do it once per Instagram account.
Before you start
Check your Instagram account type in the mobile app → Settings → Account:
- ✅ Business account — works
- ✅ Creator account — works
- ❌ Personal account — Instagram Graph API does not allow apps to manage comments/DMs on personal accounts. Convert to Professional (Business or Creator) first. It’s free and reversible.
Step-by-step
1. Open the Instagram page
In the Msgai sidebar, click Instagram. You’ll land at app.msgai.in/instagram-automation .
If your plan doesn’t include Instagram automation, you’ll see an Upgrade Plan card here instead. Upgrade first, then return.
2. Click “Connect Instagram”
You’ll be redirected to instagram.com/oauth/authorize — Instagram’s own login page.
3. Sign in with Instagram
Log in with your Instagram Business/Creator credentials. If you’re already logged into Instagram in this browser, it’ll skip the password step.
4. Review and approve permissions
Instagram will ask you to grant Msgai these permissions:
| Permission | Why Msgai needs it |
|---|---|
instagram_business_basic | Read your profile and reels so you can pick which posts get automation rules |
instagram_business_manage_comments | Receive comment events via webhook + post public replies |
instagram_business_manage_messages | Send the private DM when a trigger keyword matches |
Tap Allow. Instagram redirects you back to Msgai.
5. We finish the setup in the background
Behind the scenes, Msgai:
- Swaps the authorization code for a long-lived access token (~60-day validity)
- Reads your profile for the username + profile picture
- Subscribes our app to Instagram webhook events for
commentsandmessages
You’ll see your account appear with a Webhooks active badge.
After connecting
You’re ready to create your first automation rule.
Disconnecting
Click Disconnect on the connected-account card. Msgai:
- Unsubscribes from your Instagram webhooks (Meta stops sending events to us)
- Deletes your stored access token
- Removes every automation rule and activity log for this account
Your Instagram account itself is unaffected — this just severs our access.
What gets stored
| Stored in Msgai | Not stored |
|---|---|
| Your Instagram User ID + username + profile picture URL | Your Instagram password |
| Long-lived access token (AES-encrypted at rest) | Your DMs or comments in bulk — we only read the specific events Meta pushes |
| Automation rules you create (keywords, DM text, etc.) |
Token expiry
The long-lived token expires 60 days after issue. Msgai will prompt you to reconnect when it’s nearing expiry. Refreshing just takes one click.