简体   繁体   中英

Empty success response with a correct access token from Instagram API

I'm trying to get the user's followers, but I receive an empty response. Does anyone know what's wrong?

https://api.instagram.com/v1/users/self/follows?access_token=XXXXXX

{"pagination":{},"meta":{"code":200},"data":[]}

Thank you

The reason maybe you are in sandbox mode. Instagram APIs behave differently in Sandbox mode. One of those different behaviors is the screening / visibility of users on Instagram and / or their data set access.

So here's how you add a Sandbox user:

  • Go to Instagram Developer and login with your developer account
  • Click on Manage clients
  • Click on the Edit button for the app you want to add Sandbox users.
  • Click on Sandbox tab and enter the username / email id of an Instagram user and press enter
  • Click on Save Changes

Regarding the Sandbox concept few things to note:

  • You can only add 20 users per app
  • Any user can be sandbox user for a maximum of 5 apps.
  • You can only pull the recent data belonging to sandbox users in sandbox mode

For more details, check out this answer which explains the concept in a case by case basis or for more details, check out Sandbox Instagram Documentation

Hope it helps!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM