'Obtaining a long-life access token - Instagram Graph API

I'm aware that you can extend an access token linked to the Instagram Basic Display API, but I cannot find a way to use the Instagram Graph API to extend a short lived token to a long-lived one.

The Facebook Developer site provides an access token debugging tool that allows short-lived access tokens linked to the Graph API to be extended, but I cannot see an API endpoint to perform the same action.

It is my understanding that the Instagram Graph API is meant for connecting to business pages (my use case), and the Basic Display API is used for the account's of individuals. It is not possible to create a Facebook App that has both of these products.

Q: is there a way to extend an access token from the Instagram Graph API using an API call?



Solution 1:[1]

Thanks @CBroe for your comment outlining that Instagram Graph API access tokens are handled by the normal Facebook login.

Instagram Graph API long lived access tokens can be returned via the following endpoint

curl -i -X GET "https://graph.facebook.com/{graph-api-version}/oauth/access_token?grant_type=fb_exchange_token&client_id={app-id}&client_secret={app-secret}&fb_exchange_token={your-access-token}"

This is outlined at https://developers.facebook.com/docs/facebook-login/guides/access-tokens/get-long-lived

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Jordan