Reputation: 2668
I have difficulty using the /users/search
endpoint according to the documentation in the Instagram magnificent API. I have Sandbox app set up, I have sandbox users added, I have a valid access_token
, but when searching, Instagram returns an empty array of data with the 200 code
. Yes, I am sure the users I look for are there.
Has anybody experienced something like this in the past? Last time I've used that feature was about two months ago, and it worked fine.
Could it be some transient glitch, or am I missing something?
Upvotes: 2
Views: 1048
Reputation: 51
Since I have the same issue, I did many tests, but I found only a partial solution:
It does not seem to be a sandbox issue, but an API issue. Searching a profile with 23 characters by a search string of 1, 2, ... up to 6 characters doesn't work, however, with 7 characters the API finally found the profile to me.
Based on my own tests, I think it doesn't show because the API considers all the profiles in stock if the profile you are searching is in the first positions in relation the number of characters searched it will be showed or not (I don't know how the API orders them).
Upvotes: 1
Reputation: 12952
In Sandbox mode you will only get response for posts and users that are in your sandbox user list.
So if you search for a username in your sandbox, then only that user will be in API response, once your app is reviewed, approved and live, all the users will show up in API response.
https://www.instagram.com/developer/sandbox/
Upvotes: 0