使用Instagram Graph API获取粉丝数时遭遇#100权限缺失错误求助
Troubleshooting the (#100) Missing Permissions Error for Instagram API
followers_count Hey there, let's break down why you're hitting that frustrating permission error when trying to fetch a specific Instagram user's followers_count. I've worked through similar issues with the Graph API before, so here are the key areas to check:
1. Match Permissions to the Target Account Type
The required permissions change depending on whether the target Instagram account is personal vs. business/creator:
- Personal accounts: You only need the
instagram_basicpermission, but there's a catch:- If the account is private, you can't fetch its
followers_countat all (even with permissions). - If it's public, your app must either be in production mode (with approved permissions) or the account must be added as a test user to your app (development mode limitation).
- If the account is private, you can't fetch its
- Business/creator accounts: These are linked to a Facebook Page, so you need:
instagram_basicpages_read_engagement- You also need to ensure your access token is authorized for the linked Facebook Page (not just the app itself).
2. Verify Your Access Token's Actual Scopes
Don't just rely on the permissions you selected in the Graph API Explorer—double-check what's actually in your token:
- In the Explorer, click the "info" icon (🔍) next to your access token to view the
scopeslist. Confirminstagram_basic(andpages_read_engagementfor business accounts) are present. - If you added permissions after generating the token, you need to re-generate the token—old tokens don't automatically update with new scopes.
- Use the Graph API Token Debugger to confirm the token is valid, unexpired, and linked to the correct app/Page.
3. Ensure You're Querying the Right Node
You can't fetch followers_count directly using a username—you first need the Instagram User ID:
- For business/creator accounts linked to a Page: Call
/{page-id}/instagram_accountsto get the associated IG user ID. - For public personal accounts: Use
ig_user_search?username=YOUR_TARGET_USERNAME(requiresinstagram_basic). - Once you have the ID, run the correct query:
Double-check the field name is exactly{ig-user-id}?fields=followers_countfollowers_count(no typos likefollower_countor pluralized versions).
4. Check Your App's Mode and Test Access
- If your app is still in development mode, you can only access data from:
- Your own Instagram account (the one linked to your Facebook developer profile)
- Accounts added to your app's test user list
Trying to fetch data from any other account will trigger permission errors, even if the account is public.
- To access non-test accounts, you need to submit your app for review and get approval for the required permissions.
5. Confirm Permission Dependencies
Some permissions rely on others to work:
- For business/creator accounts,
instagram_basicrequires that you also have access to the linked Facebook Page (viapages_read_engagementandpages_show_list). When generating your access token, make sure you select the specific Page associated with the target Instagram account—don't just grant app-level permissions.
Quick Recap of the Correct Workflow
- Generate an access token with the appropriate scopes (
instagram_basic+pages_read_engagementfor business accounts). - Select the linked Facebook Page when authorizing the token (for business accounts).
- Retrieve the target Instagram User ID via the Page or username search.
- Query the IG User ID with the
followers_countfield.
内容的提问来源于stack exchange,提问作者elkefreed
相关产品推荐
相关产品推荐

