We are invoking instagram search users api to get profile list as
https://api.instagram.com/v1/users/search?q={search-term}&access_token={access-token}
but we are getting always empty result with success code as
{"meta": {"code": 200}, "data": []}
Our search term would be always instagram username i.e. username portion from https://www.instagram.com/username/
I remember this was working before 2-3 months. Any other are facing similar issue?
Sounds like you already figured out your problem. In case anyone else is having the same problem, here's a short article summarizing how Instagram's Sandbox Mode works.
TL;DR
“Sandbox mode” is the (unintuitively-named) gatekeeper walling off most of what you want to do. This is the default status for all clients, that have not undergone the strict submission process. An API client in sandbox mode has extremely limited permissions. In fact, it has fewer permissions than an anonymous user viewing public content because your app basically lives on a tiny desert island in which you are the only Instagram user and only your past twenty posts exist. So, for example, the /media/search endpoint will only return the media you uploaded near a given location, excluding the media from everyone else or any posts beyond your last twenty.
So your API call is succeeding. It just isn't finding any results because it can only "see" other sanbox users for your client.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With