Instagram access tokens for SaaS: expiry, renewal and how to stop customers from reconnecting
An Instagram long-lived token lasts 60 days. Meta refreshes it for another 60 once it is 24 hours old, and an expired one cannot be refreshed, so the customer has to sign in again. easyCoexistence keeps each customer's token, renews it with 20 of its 60 days left, checks each account every 6 hours and sends signed channel.* events, so your SaaS never stores or refreshes an Instagram token.
easyCoexistence is social media infrastructure for AI agents: its Partner API connects your customers' WhatsApp, Instagram, Facebook and TikTok accounts to your product, with no app review on your side.
Validity of a long-lived Instagram User token, and of each refresh, counted from the day of the refresh.
Minimum age before Meta refreshes a long-lived token, which must also be unexpired and carry instagram_business_basic.
What happens to a token not refreshed within 60 days: Meta will no longer refresh it.
Graph API error code for an access token that has expired; Meta's fix is to get a new token.
Instagram does not expire apps that manage business and creator accounts after 90 days of inactivity.
How often easyCoexistence checks each connected Instagram account, renewing access and emailing when it needs reconnecting.
How long does an Instagram access token last?
Sixty days at most, unless it is refreshed in time. With Business Login for Instagram, the customer's sign-in returns an authorization code that is valid for one hour and can be used once. The app's server exchanges it, with the Instagram app secret, for a short-lived Instagram User token, then exchanges that for a long-lived token valid for 60 days. Meta's refresh endpoint extends a long-lived token by another 60 days, counted from the day of the refresh, and the rest is conditions:
- The token must be at least 24 hours old, so a token issued today cannot be refreshed until tomorrow.
- It must not have expired: Meta says tokens not refreshed within 60 days expire and can no longer be refreshed.
- The customer must have granted
instagram_business_basic, the permission behind the refresh call. - Each exchange runs on the server, because it carries the app secret, which Meta says never to expose in client code.
- Once a token is gone, nothing on the app's side brings it back: the account owner signs in again.
Why do SaaS customers get disconnected from Instagram?
Mostly for reasons nobody on the customer's side notices. The first is a missed refresh: a long-lived token left past its 60 days expires for good, which happens when a refresh job fails quietly, or when a refresh refused for coming under 24 hours is never tried again. The second is the owner removing the app: Instagram's help center lists connected apps under Settings, Website permissions, Apps and websites, with Remove beside each, and from then on the app reaches only public information. The third is a refresh Meta refuses because the token no longer meets its conditions. In each case the token stops working, and Meta's Graph API error guide gives code 190, an access token that has expired, one instruction: get a new access token. Inactivity is not one of the causes for these accounts: Instagram's help center says apps with permissions to manage business and creator accounts are not expired after 90 days of inactivity. Without monitoring, a SaaS tends to learn about a drop only when a customer's scheduled post fails.
What does keeping Instagram tokens alive yourself take?
A small system of its own, beside the Meta app and its App Review. To keep customers connected on your own app, the list is:
- Encrypted storage for each customer's token with its expiry, read from
expires_inat every exchange and refresh. - A scheduled job that refreshes each token after its first 24 hours and well before day 60, and retries the ones that fail.
- A health check that calls the API for each account, so a dead token shows up before a post depends on it.
- Handling for error 190 on any call: mark the account, stop its jobs and ask the customer to sign in again.
- A deauthorize callback, so an owner removing the app in Instagram stops your jobs for that account.
- Alerts to your team and to the customer, and a way to reconnect without losing the account's settings.
How does easyCoexistence keep your customers' Instagram accounts connected?
It keeps the token and does that work on its side. Meta's terms do not allow handing the token to another app, so GET /channels/{id}?credentials=1 returns the Graph API base and the account id without it, and your backend acts through posts, the webhook relay and automations. easyCoexistence checks each account every 6 hours. During that check it renews an Instagram token once fewer than 20 of its 60 days remain and the token is more than a day old, since Meta refuses younger ones. When Instagram refuses a token, whether on the check, on a post or in an automation, the channel turns disconnected at once, a signed channel.disconnected event goes to your events URL with your external_ref, and your easyCoexistence account gets an email; a post that fails for that reason reports failure_kind reconnect. When the owner removes the app in Instagram, Meta's deauthorize callback makes the channel removed: channel.removed arrives, its scheduled posts are canceled and it leaves your bill. GET /channels/{id} shows status, disconnected_reason and last_checked_at at any time.
POST https://app.example.com/ec-events
X-EC-Event: channel.disconnected
X-EC-Signature: t=1764680400,v1=5f0c...
{
"id": "<delivery id>",
"event": "channel.disconnected",
"occurred_at": "…",
"channel": {
"id": "9a41…",
"channel": "instagram",
"external_ref": "customer_4821",
"username": "bloomcafe",
"status": "disconnected",
"token_ready": false,
"disconnected_reason": "…",
"last_checked_at": "…"
}
}What should your app do when a customer's Instagram disconnects?
Ask that customer to sign in again, and keep everything else as it is. Status events are signed with X-EC-Signature over the raw body, so verify them, reject a stale timestamp and deduplicate on id, since failed deliveries are retried with backoff. Look up the customer by the external_ref in the channel object, flag the account in your product and offer a fresh connect link, created only when they click, because each session lasts an hour. When the customer signs in again on the same Instagram account, easyCoexistence revives the same channel: the channel_id does not change, its webhook destination and automations stay in place, and channel.connected tells your backend the account is back. A channel the owner removed comes back the same way, through a new connect session, but its webhook has to be set again with PUT /channels/{id}/webhook, since removal clears the destination and its secret. For customers who leave the app in place, the renewal runs on its own, which takes the missed refresh off the list of causes.
How to set it up
- Set the events URLPUT /events-endpoint with your HTTPS URL and keep the signing secret it returns, shown once.
- Verify each status eventCheck X-EC-Signature on the raw body, reject timestamps older than 5 minutes and deduplicate on the event id.
- Flag the customer on channel.disconnectedFind the customer by the event's external_ref and show a reconnect prompt beside the Instagram account.
- Send a fresh connect linkWhen they click, POST /connect-sessions with channel instagram and the same external_ref, then redirect them to the url.
- Clear the flag on channel.connectedThe channel_id is the same as before, so keep your mapping and resume the customer's posts and automations.
Common mistakes
- Refreshing every token on one fixed date. Meta counts 60 days from each token's last refresh and refuses tokens under 24 hours old, so schedule by each token's own expiry.
- Retrying calls that fail with error 190. Meta's error guide says to get a new access token, so retries only delay the reconnect the customer has to make.
- Waiting for a failed post to notice a drop. Handle channel.disconnected from your events URL and prompt the customer before their next scheduled post.
- Creating a new customer record on reconnect. Signing in again revives the same channel_id with its webhook and automations, so only clear your flag.
easyCoexistence holds your customers' Instagram tokens, renews them on schedule and watches each account, so your SaaS ships Instagram features without a token store, refresh job or deauthorize handler: one hosted link connects an account, and signed channel.* events tell your backend when a customer needs to sign in again. The same holds for Facebook Pages and TikTok accounts. 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, Google Business Profile 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
Can an expired Instagram token be refreshed?
No. Meta refreshes only long-lived tokens that are unexpired and at least 24 hours old; after 60 days without a refresh, the account owner has to sign in again.
Can my SaaS get the Instagram token from easyCoexistence?
No. Meta's terms keep it with easyCoexistence, so the credentials call returns identifiers only, and your backend publishes, listens and replies through the posts endpoint, the webhook relay and automations.
How fast does my app hear that an Instagram account dropped?
As soon as Instagram refuses its token, on a check, a post or an automation run: channel.disconnected goes to your events URL with your external_ref, and your account gets an email.
Does a reconnected Instagram account keep its channel_id?
Yes. When the customer signs in again through a new connect session, easyCoexistence revives the same channel, with its webhook and automations, and sends channel.connected.
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