Instagram API wiki
Please add your learnings, favorite links and gotchas here by editing this page.
Nango currently does not support long-lived access tokens and token refreshes for the Instagram Basic Display API. See this open issue for details.
This restriction does not apply to the Instagram Graph API.
Using Instagram with Nango​
Note that Instagram has two different APIs: The Instagram Graph API (for Business and Creator accounts) and the Instagram Basic Display API (for Consumer/regular accounts).
This template implements the Instagram Basic Display API OAuth. For access to the Instagram Graph API use the Facebook template and follow the instructions under "API specific gotchas" below.
Provider template name in Nango: instagram
Follow our quickstart to add an OAuth integration with the Instagram API in 5 minutes.
App registration & publishing​
Apps for the Instagram API can be registered here (you must be logged in with your Facebook/Meta account). Select "Consumer" as the app type, then follow these steps. You can find your OAuth redirect URL of your Nango instance in the quickstart.
When registering your provider config with Nango, use the Instagram App ID and Instagram App secret as client_id
and client_secret
(NOT your Meta app's app id & secret).
Useful links​
- Instagram Basic Display API docs
- Instagram Basic Display API OAuth scopes -> These scopes did not work for me. What worked was
user_profile
anduser_media
- Instagram Graph API docs (see below for how to add OAuth)
API specific gotchas​
- For the Basic Display API the scope
user_profile
is mandatory. The only other available scope seems to beuser_media
. - For access to the Instagram Graph API follow these steps:
- The Instagram Graph API uses Facebook OAuth to authenticate the accounts. Add a provider config for it to Nango with the scopes specified here.
- Once the login flow completes you can query the facebook API for the Instagram account details (follow steps 4-6).