6

I am using Instagram API for my application. I need access to the feed of private users whom I am following, but the response is:

code: 400
error_type: APINotAllowedError
error_message: you cannot view this resource

I could not find anything in the documentation regarding this. I was hoping that as I am able to see the user's feed on my app, I would be able to retrieve the same using the API.

Any way around this? Please help.

Nicholas Flees
  • 1,943
  • 3
  • 22
  • 30
Vijesh Chandera
  • 101
  • 1
  • 4
  • Can you add some code that you use to access the API? That may be helpful. – josh May 12 '14 at 03:31
  • I am using a PHP Wrapper class that uses curl functions to make http calls. The http call that is used here is the same as that in the documentation: https://api.instagram.com/v1/users/ – Vijesh Chandera May 12 '14 at 07:22

1 Answers1

0

[As instagram changes their api, this tips may not work forever]

I faced same issue and the cause is it happens when the posts are private , even if user access token is passed with endpoints this errors happen.

Solution: just in place of userid use 'self' for private profile. means if a profile has private posts then who connects should be the same person of the profile and other person can not view his/her posts.

Example:

https://api.instagram.com/v1/users/USER_ID/media/recent/?access_token=USER_ACCESS_TOKEN_HERE if this endpoints shows error then use https://api.instagram.com/v1/users/self/media/recent/?access_token=USER_ACCESS_TOKEN_HERE

(just replace 'userid' with 'self')

Manchumahara
  • 139
  • 1
  • 9