0
votes

If i use this link of the Instagram API i get nothing back:

https://api.instagram.com/v1/locations/1/media/recent?access_token=XXXX

Response:

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

The documentation says that there are to parameters max_id and min_id, but i'm not sure how to use them. If i use it like this:

https://api.instagram.com/v1/locations/10/media/recent?access_token=XXXX&min_id=1&max_id=20

I get the same result as above.

Both Location IDs (1 and 10) are correct.

1

1 Answers

1
votes

That is cause you are in sandbox mode.

In sandbox mode you will only see your posts(and your approved sandbox users) in API, and total posts in API response is also limited to 20.

If you want to see posts in API response in sandbox mode, then you add a post tagged to a location using Instagram app, and then access that location via API, you will see just your post in API response. Once you get public_content permission and go to live mode, you will see all posts.

Here is more info about sandbox mode: https://www.instagram.com/developer/sandbox/

The behavior of the API when you are in sandbox mode is the same as when your app is live, but comes with the following restrictions:

  • Data is restricted to sandbox users and the 20 most recent media from each sandbox user
  • Reduced API rate limits