Insights

How To Renew Instagram Long Lived Access Token

Goal

Describe how to renew long lived Instagram Access Token. This is not meant to be an overall step-by-step guide on getting Instagram API to work in Sitecore, but rather it's designed to be a quick reference on renewing Instagram Long Lived Access Token.

Pre-Requisite

  • Facebook Developer Account & App with Instagram Basic Display API or Graph API
  • Possession of already provided valid Long Lived Instagram Access Token
  • API Platform like Postman (recommended, but can be any platform or terminal that supports API)
if the pre-requisite is not met, please visit the official documentation or follow this tutorial (recommended)

Postman Workspace

1. Set Up

Set up a workspace in postman if you have not already. It should look like the picture below.

Postman workspace

2. Fill In Root Url

Fill in the root URL: https://graph.instagram.com/refresh_access_token.

Postman Fill in Root Url page

3. Fill In The Query Params

Fill in the KEY column: access_token and grant_type. In the VALUE column, use your current access token for access_token, and 'ig_refresh_token' for grant_type like so:

Postman Fill in the Query Params

4. Send

Now press 'send'. If the result you get is something similar to this, the API call was successful.

Postman after Send screen

Now you just need to update this access token in your application. Note that this access token lasts 60 days. Additionally, your previous access token is still valid and can be used until its original expiry date.

👋 Hey Sitecore Enthusiasts!

Sign up to our bi-weekly newsletter for a bite-sized curation of valuable insight from the Sitecore community.

What’s in it for you?

  • Stay up-to-date with the latest Sitecore news
  • New to Sitecore? Learn tips and tricks to help you navigate this powerful tool
  • Sitecore pro? Expand your skill set and discover troubleshooting tips
  • Browse open careers and opportunities
  • Get a chance to be featured in upcoming editions
  • Learn our secret handshake
  • And more!
Sitecore Snack a newsletter by Fishtank Consulting