How to refresh the expired access token?

If your access token expired, this article will show you how to refresh it properly. There are two different methods:

  1. Token refreshing through the user account.
  2. Token refreshing through the access token page.

Both methods require access to the Instagram account. You must know the credentials to the Instagram account or have a role on the Facebook Page.

Token refreshing through the user account.

If you connected the account directly to your user on Instagram, this method is for you. You can also use it if you are a developer for your client’s Instagram account.

Step 1 – Go to the list of your accounts.

Screenshot showing active Accounts link in user menu.

Log in to your user account. Click on the Accounts link in the user menu. You will see the list of all your Instagram accounts.

Step 2 – Find the account with the expired token.

Each Instagram account will have the information about the access token status like in the image below:

Screenshot from the accounts page on LightWidget website showing 2 different Instagram accounts. One with expired token and one with active.

There are two possible statuses:

  1. Active – the token is functional and does not require renewal.
  2. Expired – the connection is not valid, and it needs renewing.

Find the account that has the expired token status.

Step 3 – Refresh the access token.

Click the Refresh token button for the account with the expired token. You will see Instagram or Facebook page depending on your account’s connection type.

Proceed with the instructions on the website. Ensure you grant all requested permissions to refresh the token successfully.

Step 4 – Wait for the widget update.

Once you refresh the access token, you will see our website again and the information that the widgets are refreshing.

Please remember that your widgets will not update immediately with a new token. We add all the Instagram widgets from the selected account to a refresh queue with high priority. It usually takes about a minute or two before they pull the new content from Instagram API.

Also, remember that we use the browser cache to optimize the performance of our widgets. Even if the refresh queue updated the feed, your browser might present you with an outdated version from the cache.

We cache free widgets for 6 hours and the one with the upgrade add-on for 30 minutes. You will see the updated version once the cache expires. If you want to see the changes faster, please flush your browser cache or use the DevTools with a disabled cache mechanism. 

You can find instructions showing how to clear the browser cache for most popular browsers in this article – How to clear the cache.

Token refreshing through the access token page.

If you don’t have access to the user account on LightWidget or a developer role, this method might be for you. You still need the credentials to the Instagram account or role on the Facebook Page to refresh the expired connection.

Step 1 – Go to the access token page.

Screenshot from access token page showing two buttons - consumer connection and business connection.

Click the button below:

The access token page is a tool that helps you refresh the access token without being logged in to the user account on LightWidget. 

Step 2 – Refresh the access token.

You must know which connection the Instagram account uses. Depending on the connection type, click one of the buttons – Consumer connection or Business connection.

The consumer connection will take you to the Instagram website. The Business connection will take you to the Facebook website.

Confirm the access for the LightWidget app to refresh the token successfully.

Step 3 – Wait for the widget update. 

You should see the access token tool page again with the information about the refreshed token. The same principles apply to the previous method (read step 4. in token refreshing through the user account.)
The widgets will not pull the new photos immediately. It usually takes a few minutes or requires clearing the browser cache to see the results faster.

Comments (19)

  • It's working!

    RoninZ [Andy Güttner]

  • O Botão sumiu !

    Nitronplast

  • What if the widget is on a Developer account? Can the Developer refresh the token or does the IG account owner need to do it only?

    DermPRO

    • LightWidget profile picture

      Hi! The developer has the option to refresh the access token, but he must either know the credentials to the Instagram account (if it is connected over customer connection) or have a role on the Facebook Page connected with the Instagram account (in case of business connection).

      LightWidget

  • Why do the access tokens expire? And is there a way to prevent this?

    Big Bazar

    • LightWidget profile picture

      The access tokens are an integral part of the official Instagram APIs that we are using to refresh our widgets. Due to the previous abuses of the APIs (for instance Cambridge Analytica data scandal), Facebook/Instagram decided to add shorter expiration times for the access tokens to protect user privacy. Currently, it is not possible to prevent the token expiration, we don't have any impact on the token expiration date, since it's set by Instagram, not by LightWidget. If you have at least one upgraded widget you can turn on the expired token notifications in the Settings of your account. Next time, when the token will expire, you will get an email notification with the link to refresh the token:)

      LightWidget

  • I updated my password on Instagram and now the images are not showing, how can I fix it?

    muebleslafabrica

    • LightWidget profile picture

      Hi! Changing the password to your Instagram accounts marks your access token as expired immediately and soon after, the images will stop showing in the widget. The token needs to be refreshed according to the instructions in this article:) In case of any troubles, please drop us a support ticket!

      LightWidget

  • Does updating the token destroy the original widget?

    fieberanob

    • LightWidget profile picture

      Updating the token does not destroy the widget:) If you have any problem with the widget after refreshing the token, please contact us via our support form!

      LightWidget

  • I cannot get our access token to refresh. Please help!

    morganc

  • I cannot get our access token to refresh. Please help! This is the error message I keep getting: Whoops! An error occurred! Unfortunately, an error occurred while processing your request:( This exception has been logged and our developers will take further actions. Error code: 1075 Error details: Unable to refresh the access token. It seems that you never connected this Instagram account with the LightWidget before. Please log in to our website first to connect this account first. Please try again. If this error will happen again you can always report this problem via our support page.

    morganc

    • LightWidget profile picture

      Hi there! If this is regarding the @dunnortho812 Instagram account, please make sure that you will use the "Business connection" button on the refresh token page, not the Consumer connection. Your Instagram account is using the Business connection, hence this method is required. If it will not solve the problem, please drop us a support ticket with more details, we will have a closer look!

      LightWidget

  • It looks like their API allows for tokens to be automatically refreshed as long as they haven't expired: https://developers.facebook.com/docs/instagram-basic-display-api/reference/refresh_access_token/ Would that be something you would be able to run on a CRON to automatically update the tokens for Instagram?

    justin

    • LightWidget profile picture

      Hi Justin! We are aware of this functionality and we have it implemented on our end. Sadly it can only renew the session, it does not allow the renewal of data access which is required to get the information about your media and convert them into widgets:/

      LightWidget

  • Lightwidgetを導入した状態でサーバーを引っ越したら(URLは同一)画像が表示されなくなりました。この場合アクセストークンの更新が必須なのでしょうか?

    sisterweb007

    • I posted in Japanese. No need to reply here.

      sisterweb007

  • After moving the server with Lightwidget installed (the URL is the same), the image is no longer displayed. Is it necessary to update the access token in this case?

    sisterweb007

    • LightWidget profile picture

      Unlikely, but probably. Please check your dashboard and see the status of the access token. If it is expired, please refresh it.

      LightWidget

You must be logged in to post comments.