How to connect an Instagram account to an API or AI agent
An Instagram account connects to an API or AI agent through Instagram Login. The owner signs in with a professional account, Business or Creator, and approves the app's five permissions, covering basic access, publishing, comments, messages and insights; the app then gets a 60-day token, refreshable for another 60. For DMs, the account also turns on Allow access to messages in the Instagram app.
easyCoexistence connects an Instagram Business or Creator account in one sign-in with Instagram's own login, keeps its access renewed and checks it every 6 hours, so Claude, ChatGPT or your own platform can publish, schedule, reply to comments and DMs and read insights through Meta's official API.
Meta's list for the Instagram product: instagram_business_basic, content_publish, manage_comments, manage_insights and manage_messages.
How long the authorization code from Instagram's login stays valid; it can be exchanged only once.
Validity of the long-lived Instagram User access token, which can be refreshed for another 60.
How long an easyCoexistence connect link works before its session expires.
Which accounts can connect?
Instagram professional accounts, Business or Creator. Meta's API serves both types the same way for publishing, comments, DMs and insights, and a personal account first switches to professional in the Instagram app, under Account type and tools. With Instagram Login, the owner signs in with the account's own Instagram credentials, at Instagram's own login page.
What does the owner see when signing in?
Instagram's own login window. The app sends the owner to https://www.instagram.com/oauth/authorize with its Instagram app ID, a redirect URI and the permissions it asks for; the owner logs in, reviews them and approves. Instagram then returns to the app with a code, valid for one hour and usable once, which the app's server exchanges for a token. A cancelled sign-in comes back with error=access_denied.
What is each permission for?
Each feature needs instagram_business_basic plus a permission of its own, and the owner approves them together in the same window. easyCoexistence requests these five, the set Meta lists for the Instagram product, so an agent can publish, reply and measure on the account:
How do you turn on DMs?
In the Instagram app, open Settings, then Messages and story replies, Message controls and Connected tools, and turn on Allow access to messages. Meta requires the toggle before an app can manage the account's DMs; until it is on, sends fail even with the messaging permission granted, while publishing and comments work as usual.
How do you connect it to easyCoexistence?
From the dashboard, in one sign-in: choose New connection, then Instagram, and log in with the professional account. An account with no card on file is asked for one first, since each connection is billed. When Instagram hands back, the channel page reads Connected, and easyCoexistence subscribes the account to its comment, mention and DM events, renews its access before the 60 days run out and checks it every 6 hours.
How does a platform connect its customers' accounts?
With a hosted connect link from the Partner API. Your backend posts to /api/v1/connect-sessions with channel set to instagram and a redirect_url, then sends the customer to the url it returns; the customer signs in with Instagram there, with no easyCoexistence account of their own. The browser comes back with the session, the status and the new channel_id, which your backend confirms with GET /connect-sessions/:id before trusting it.
curl -X POST https://easycoexistence.com/api/v1/connect-sessions \
-H "Authorization: Bearer $EC_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"channel": "instagram",
"redirect_url": "https://app.example.com/connect/return",
"external_ref": "customer_4821"
}'What happens after it connects?
The account is ready for whatever works on it. list_social_accounts returns it to Claude, ChatGPT or your own agent, get_social_credentials hands its ID and API base to your code, and its comment, mention and DM events go to your endpoint once you set one, with set_social_webhook_destination or PUT /api/v1/channels/:id/webhook.
Why would a connection fail?
Usually for one of four reasons, each with a direct fix:
- The account is personal: switch it to Business or Creator in the Instagram app.
- The owner cancelled the sign-in: nothing connects, and starting again opens a fresh window.
- The account is already connected to another easyCoexistence account: remove it there first.
- The connect link was opened after its hour: create a new session.
How to set it up
- Make the account professionalIn the Instagram app, switch to a Business or Creator account under Account type and tools.
- Start the connectionIn the easyCoexistence dashboard, choose New connection, then Instagram.
- Approve the permissionsLog in with the professional account and approve the five permissions Instagram shows.
- Allow access to messagesTurn on Allow access to messages under Connected tools in the Instagram app, so DMs work.
- Point your AI at itAdd https://easycoexistence.com/api/mcp to Claude or ChatGPT, or call the account from your own code.
Common mistakes
- Approving the wrong account. Instagram's window signs in with the account already logged in on that browser, so switch accounts there before connecting.
- Trusting the redirect's status on its own. Anyone can type status=connected into a URL, so confirm the session with GET /connect-sessions/:id from your backend.
- Sending webhook_url on an Instagram connect session. The API refuses it there; set the account's event relay with PUT /api/v1/channels/:id/webhook once it connects.
US$ 9 to US$ 0.75 per connection per month, falling as you add connections, with the first 3 days free.
easyCoexistence is a multichannel API and MCP server that connects AI agents such as Claude and ChatGPT to WhatsApp, Instagram, TikTok, Facebook and more. On WhatsApp it uses Coexistence: the business keeps using its number in the WhatsApp Business app while the AI works through Meta's official API.
Frequently asked questions
Do I need my own Meta developer app to connect?
No. easyCoexistence's Meta app holds the Instagram permissions, so the owner signs in with Instagram and approves them, with no app, App Review or Business Verification of their own.
Can a Creator account connect?
Yes. Business and Creator accounts both connect, and Meta's API treats them alike for publishing, comments, DMs and insights.
Can I connect several Instagram accounts?
Yes, each with its own sign-in. Each account is one connection, billed at US$ 9 to US$ 0.75 per connection per month as your total grows.
What if the account is already connected elsewhere?
It cannot join a second easyCoexistence account while it is live on the first, which stops anyone who controls the Instagram from pulling it away from a paying account. Remove it there, then connect it again.
Keep reading
Connect your first channel in two minutes.
No platform reviews to wait for. Connect WhatsApp, Instagram, TikTok or another channel, then ask your AI to post, reply or report, and watch it work.
- 3 days free
- Cancel any time
- Official APIs only
- Monitored 24/7
Verified on