Log inStart Free Trial
easyCoexistence Official APIs

Instagram access tokens: long-lived tokens, 60 days and refreshing

An Instagram long-lived access token is valid for 60 days and can be refreshed for another 60 once it is at least 24 hours old, as long as it has not expired. With Instagram Login, signing in gives a short-lived Instagram User access token valid for one hour, which the app's server exchanges for the long-lived one.

easyCoexistence keeps the Instagram token current for you: it renews access before the 60 days run out, checks the account every 6 hours and emails you when it needs reconnecting, so Claude, ChatGPT or your own code call Meta's official API with a token that is kept current.

1 hour

How long a short-lived Instagram User access token from the login stays valid.

60 days

How long a refreshed long-lived token is valid, counted from the date it was refreshed.

24 hours

Minimum age of a long-lived token before Meta will refresh it.

Once

How many times a login's authorization code can be exchanged; it is valid for 1 hour.

Which token does Instagram Login use?

An Instagram User access token. It follows OAuth 2.0, is scoped to the app, and holds the app, the expiry, the account's Instagram user ID and the permissions granted; it goes with each call to graph.instagram.com. Facebook Login uses Facebook User or Page access tokens instead, and Unified Login a Business Integration System User access token.

How does an app get a long-lived token?

In two exchanges after the login, both made from the server. The login redirects with a code, valid for one hour and usable once. POST https://api.instagram.com/oauth/access_token, with the Instagram app ID and secret, turns it into a short-lived token, the account's app-scoped user ID and the permissions granted. GET https://graph.instagram.com/access_token with grant_type=ig_exchange_token and the app secret then returns the long-lived token, with expires_in in seconds.

1LoginRedirect with a code, valid 1 hour, usable once
2Short-lived tokenFrom api.instagram.com/oauth/access_token, valid 1 hour
3Long-lived tokenFrom graph.instagram.com/access_token, valid 60 days
4RefreshFrom graph.instagram.com/refresh_access_token, 60 more days

How is a long-lived token refreshed?

With GET https://graph.instagram.com/refresh_access_token, grant_type=ig_refresh_token and the current long-lived token. The response holds a token valid for 60 days from the refresh. Meta refreshes only when three conditions hold:

  • The token is long-lived and at least 24 hours old.
  • It has not expired.
  • The account owner granted instagram_business_basic.
Refreshing a long-lived token
GET https://graph.instagram.com/refresh_access_token
  ?grant_type=ig_refresh_token
  &access_token=<LONG_LIVED_TOKEN>

{
  "access_token": "<NEW_LONG_LIVED_TOKEN>",
  "token_type": "bearer",
  "expires_in": 5183944
}

What happens when a token expires?

It stops working for good. A long-lived token that is not refreshed within its 60 days expires and can no longer be refreshed, and calls made with it fail with Graph API error 190, access token expired. The only way back is a new login by the account owner, which starts the exchange again.

Why must the exchanges run on a server?

Because they carry the app secret. Meta says requests for long-lived tokens belong in server-side code, never in client-side code or an app binary that could be decompiled, and that the secret should not be shared, sent to a client or stored on a device.

How do you call Instagram through easyCoexistence without handling the token?

Through the MCP tools. publish_instagram_post, list_social_posts, list_social_comments, reply_to_comment, hide_comment, send_social_dm and get_social_insights act as the account, and easyCoexistence adds the token on its side. Instagram tokens are never handed out (Meta's terms), so get_social_credentials returns the Instagram account ID and the API base only; the token and its renewal stay with easyCoexistence.

Common mistakes

  • Exchanging tokens in a browser or mobile app. The calls carry the app secret, which Meta says must stay in server-side code.
  • Refreshing a token on its first day. Meta refreshes long-lived tokens only once they are at least 24 hours old.
  • Reusing an authorization code. It is valid for one hour and works once; a second exchange is refused.
  • Using the Meta app ID and secret for Instagram Login. Business Login for Instagram takes the Instagram app ID and secret from the App Dashboard's Instagram settings.
Doing this with EasyCoexistence

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

How long does an Instagram access token last?

A short-lived token lasts one hour. A long-lived one lasts 60 days and can be refreshed for another 60.

How long is the Instagram authorization code valid?

One hour, and it can be exchanged only once; a second exchange with the same code is refused.

Which app ID and secret does Instagram Login use?

The Instagram app ID and secret shown in the App Dashboard's Instagram settings. Business Login for Instagram takes those, not the Meta app's own ID and secret, for the login URL and the token exchanges.

Does easyCoexistence refresh Instagram tokens?

Yes. It renews access before expiry, checks each account every 6 hours and sends an email when one needs reconnecting.

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