17

I'm trying to get medida data from Instagram via their REST service. I've got an access token and tried to get some media data, I'm using this query

https://api.instagram.com/v1/users/184692323/media/recent/?access_token=

I get this response

{"meta":{"error_type":"APINotFoundError","code":400,"error_message":"this user does not exist"}}

The user ID does exist, I actually tried to use Lady Gaga's user ID, which I got from here: http://jelled.com/instagram/lookup-user-id# When I use my user-id, it works. It just seems to not work with other user ids.

What can I do? Is this something related to these new "sanbox" rules?

user2529173
  • 1,884
  • 6
  • 30
  • 43
  • It worked [here](https://api.instagram.com/v1/users/184692323/media/recent/?access_token=2253563781.137bf98.bd1c3693d2b84f80a7ab8d661f641437) – Adam Azad Nov 27 '15 at 11:40
  • Your comment doesn't answer the question. –  Nov 28 '15 at 09:15

4 Answers4

23

I think you are still running in Instagram Sandbox-mode: https://www.instagram.com/developer/sandbox/.

Citing their page: For example, if you query the /users/{user-id}/ endpoint and the {user-id} is a sandbox user, then you will get the normal API response; but if the {user-id} is not a sandbox user, you will get a APINotFound error.

I have the same issue for non-Sandbox users, which are public but nevertheless Instagram returns it's not a valid user. So the docs seem to be correct.

Dennis
  • 780
  • 6
  • 17
  • My app is in Sandbox mode. But still i m getting same error `[meta] => stdClass Object ( [error_type] => APINotFoundError [code] => 400 [error_message] => this user does not exist )` @dennis can you help me. – Prabu Guna Apr 06 '16 at 12:25
  • @prabu Add your user to your Instagram sandbox. – Dennis Apr 19 '16 at 09:01
2

the user exits, but you may be blocked by instagram for spamming, usually you get that response if spam was detected by an account, try with different user access_token, it should work.

krisrak
  • 12,882
  • 3
  • 32
  • 46
2

I am very late but you need to invite the user in your application's sandbox and he needs to accept your invitation to actually get any information out of it.

1

In addition to what Dennis said,

You need to submit your App for review if you're doing things with public profiles. It's not super complicated, but you'll need to build an actual use case for them to approve your app out of sandbox mode.

Or, you can add the users you want to play with to your sandbox app.

Tom Roggero
  • 5,777
  • 1
  • 32
  • 39