简体   繁体   中英

Instagram API - Search for user in Sandbox mode

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?

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).

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/

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