← All posts

Instagram Access Token Expires After 60 Days, Here Is the Fix

An Instagram access token expires after 60 days if it is a long-lived token, and after 1 hour if it is a short-lived one. You can refresh a long-lived token for another 60 days, but only while it is still valid and at least 24 hours old. Miss that window and the integration stops until you connect the account again.

Short-lived and long-lived tokens

An access token is the key your tool uses to act for your Instagram account. It proves that you approved the connection and which permissions you granted. Instagram issues two kinds.

Short-lived token Long-lived token
Lifetime 1 hour 60 days
How you get it Right after logging in and approving permissions By exchanging a short-lived token, or from the app dashboard
Can it be refreshed No Yes, under conditions
Use it for The first step of connecting Anything that runs unattended

A campaign that answers comments for a week cannot run on a key that dies after an hour, so every real integration uses a long-lived token. That moves the problem from one hour to two months, which is long enough to forget about.

When you can refresh a token

A long-lived token can be refreshed when both of these are true:

  1. It is at least 24 hours old.
  2. It has not expired.

A successful refresh gives you a new 60 days.

The 24 hour rule means you cannot refresh a token right after creating it. A script that refreshes on every run will fail on day one. Wait at least a day.

The not expired rule is the one that hurts. Refreshing is maintenance for a living token. Once it has expired there is nothing to refresh, and the only way back is to go through the login again, approve the permissions and obtain a new token.

So the safe period runs from day 2 to day 59, and nothing forces you to wait until the end. Refreshing early costs nothing.

What breaks when an Instagram access token expires after 60 days

Everything that uses the token stops at once, and it stops quietly.

  • Comments are no longer read. A tool that polls for new comments gets an authentication error on every request.
  • DMs are not sent. Keyword comments keep arriving on your post and nobody gets a message.
  • Public replies stop. The comment section shows unanswered requests.

Do not count on a warning in advance. The first sign is usually a follower asking where their message is.

There is a second cost. A private reply can only be sent within 7 days of the comment. If the token dies during a campaign and you notice ten days later, the earliest comments from the outage are already out of reach by DM. You will have to answer those publicly and ask people to message you.

One thing does not break: your permissions and your app. An expired token does not undo your setup. If you followed how to create a Meta app for the Instagram API, the app, the product and the webhook subscription are still there. You only need a new token.

A reminder routine that works

Level 1: a calendar reminder. On the day you generate the token, create a repeating event every 45 days titled "Refresh Instagram token". Write the steps in the event description so future you does not have to remember them. This is enough for one account.

Level 2: store the expiry date. Wherever the token is saved, save the date it expires next to it. Show that date somewhere you look regularly. A token with no visible expiry date is a surprise waiting to happen.

Level 3: refresh automatically. A scheduled job checks the token once a day. If the token is more than 24 hours old and has fewer than, say, 15 days left, the job refreshes it and saves the new token and the new expiry date. Daily checks mean a single failed attempt is retried the next day, with two weeks of margin.

Level 4: alert on failure. Automation fails too. If a refresh fails, or if any API call returns an authentication error, send yourself an email or a message immediately. The alert is what turns a ten day outage into a ten minute one.

A few habits make all four levels safer:

  • Save the new token before discarding the old one. If the save fails, you still have a working key.
  • Never keep the token in code or in a shared document. Use a secrets store or an environment variable.

Other reasons a token stops working

Expiry is the most common cause, but not the only one. If a token fails well before its 60 days, for example after you remove the app's access in your Instagram settings, check Meta's documentation, because the conditions may vary. The fix is the same: connect again and store the new token.

If your app serves accounts other than your own, access level becomes part of this picture too. See Instagram API standard access vs advanced access.

The takeaway

Write down the expiry date, refresh between day 2 and day 59, and make sure a failure reaches you the same day. A token that is refreshed on a schedule never becomes a problem. One that is forgotten takes the whole campaign down without a sound.

We hit this while building CometoDM, our comment to DM tool, which is in development with a waitlist: the token is the one part of the setup that fails on a calendar, not on a bug. Whatever you run, a calendar event set for 45 days from today is the cheapest insurance available.