Reputation: 2428
I'm trying to fetch posts of the users whom I follow in instagram. I've created the app, I receive valid access token, app is running in the sandbox mode. I've added a user in the sandbox, whom I follow, as in sandbox only sandbox user data is available for viewing. What I'm trying is to fetch user's follow list, that is successfully done through users/self/follows?access_token=ACCESS_TOKEN
request, which succeeds and I already have the user id. Then I'm trying to call /users/{user-id}/media/recent
for getting that user's recent media. I believe this should work, as I'm following that user and that user has approved my follow request. However the request fails telling following
{
"meta": {
"error_type": "APINotAllowedError",
"code": 400,
"error_message": "you cannot view this resource"
}
}
Some details how I've configured the instagram app.
The scope that I use is basic+public_content+follower_list
.
I don't use implicit authentication, and have custom backend to handle authentication with client_secret.
Also, I know an app Followers+ which can read the media of each user you follow. So this should be something that is possible to do, and I don't know why I can't do that.
Any ideas? Thanks
Upvotes: 2
Views: 1437
Reputation: 12952
Looks the error you get if user is private, if the user is private, then you cannot access the user via API even if you are approved to follow by that user. This was a new change in API post June 1, 2016.
The only way to access private users is to use Instagram app or instagram.com
Upvotes: 1