{"action":"created","issue":{"url":"https://api.github.com/repos/Instagram/python-instagram/issues/202","labels_url":"https://api.github.com/repos/Instagram/python-instagram/issues/202/labels{/name}","comments_url":"https://api.github.com/repos/Instagram/python-instagram/issues/202/comments","events_url":"https://api.github.com/repos/Instagram/python-instagram/issues/202/events","html_url":"https://github.com/Instagram/python-instagram/issues/202","id":118364109,"number":202,"title":"access_token not passed to api - apps created after november 17th 2015 will fail to auth for anything other than user information","user":{"login":"edsykes","id":1677173,"avatar_url":"https://avatars.githubusercontent.com/u/1677173?v=3","gravatar_id":"","url":"https://api.github.com/users/edsykes","html_url":"https://github.com/edsykes","followers_url":"https://api.github.com/users/edsykes/followers","following_url":"https://api.github.com/users/edsykes/following{/other_user}","gists_url":"https://api.github.com/users/edsykes/gists{/gist_id}","starred_url":"https://api.github.com/users/edsykes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edsykes/subscriptions","organizations_url":"https://api.github.com/users/edsykes/orgs","repos_url":"https://api.github.com/users/edsykes/repos","events_url":"https://api.github.com/users/edsykes/events{/privacy}","received_events_url":"https://api.github.com/users/edsykes/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-11-23T11:39:50Z","updated_at":"2015-12-10T22:31:39Z","closed_at":null,"body":"Hi,\r\n\r\nfirst off thanks for your efforts with the wrapper. It's much appreciated. Before I get started, I'm not 100% sure of the facts right now but wanted to log this to help anyone else who hits this problem.\r\n\r\nI'm currently working with a sandboxed app that was created after november 17th. It appears that instagram are in the midst of an api change. One of the changes is that in the server side flow the access_token must be passed up with all the requests, it's not enough to just pass up client credentials. \r\n\r\nThe symptom is that you receive auth errors while trying to access the recent media of an user for whom you have a token.  I have tracked down the issue and it looks like oauth2.prepare_request has no provision for including the access_token. \r\n\r\nLike I say, some of these details might be wrong, but once I have a better understanding of what's going on I'll fork and send a pull request."},"comment":{"url":"https://api.github.com/repos/Instagram/python-instagram/issues/comments/163770406","html_url":"https://github.com/Instagram/python-instagram/issues/202#issuecomment-163770406","issue_url":"https://api.github.com/repos/Instagram/python-instagram/issues/202","id":163770406,"user":{"login":"drazenzubovic","id":16003123,"avatar_url":"https://avatars.githubusercontent.com/u/16003123?v=3","gravatar_id":"","url":"https://api.github.com/users/drazenzubovic","html_url":"https://github.com/drazenzubovic","followers_url":"https://api.github.com/users/drazenzubovic/followers","following_url":"https://api.github.com/users/drazenzubovic/following{/other_user}","gists_url":"https://api.github.com/users/drazenzubovic/gists{/gist_id}","starred_url":"https://api.github.com/users/drazenzubovic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drazenzubovic/subscriptions","organizations_url":"https://api.github.com/users/drazenzubovic/orgs","repos_url":"https://api.github.com/users/drazenzubovic/repos","events_url":"https://api.github.com/users/drazenzubovic/events{/privacy}","received_events_url":"https://api.github.com/users/drazenzubovic/received_events","type":"User","site_admin":false},"created_at":"2015-12-10T22:31:39Z","updated_at":"2015-12-10T22:31:39Z","body":"Yes it is possible the root cause is the same here, but I am puzzled that on call to InstagramAPI\r\n```python\r\napi = InstagramAPI(access_token=access_token, client_secret=client_secret)\r\nprint api\r\n```\r\nI am getting (apparently) valid handle from Instagram:\r\n```\r\n<instagram.client.InstagramAPI object at 0x7f3fd9e89c50>\r\n```\r\nAs for cURL, I was referring to correct response from Instagram direct API as below (after doing some obfuscation) to the same endpoint media_recent (as above):\r\n```bash\r\nwhite:~ xxx$ curl https://api.instagram.com/v1/users/self/media/recent/?access_token=aaaaaaaaaa.bbbbbbbbb.ccccccccccccccccccccc\r\n{\"pagination\":{},\"meta\":{\"code\":200},\"data\":[{\"attribution\":null,\"tags\":[],\"type\":\"image\",\"location\":null,\"comments\":{\"count\":1},\"filter\":\"Normal\",\"created_time\":\"1449767584\",\"link\":\"https:\\/\\/www.instagram.com\\/p\\/_HodXAA1Jq\\/\",\"likes\":{\"count\":0},\"images\":{\"low_resolution\":{\"url\":\"https:\\/\\/scontent.cdninstagram.com\\/hphotos-xpf1\\/t51.2885-15\\/s320x320\\/e15\\/12357784_n.jpg\",\"width\":320,\"height\":320},\"thumbnail\":{\"url\":\"https:\\/\\/scontent.cdninstagram.com\\/hphotos-xap1\\/t51.2885-15\\/s150x150\\/e15\\/c180.0.720.720\\/12353258_n.jpg\",\"width\":150,\"height\":150},\"standard_resolution\":{\"url\":\"https:\\/\\/scontent.cdninstagram.com\\/hphotos-xpf1\\/t51.2885-15\\/\\/sh0.08\\/e35\\/12357784__n.jpg\",\"width\":640,\"height\":640}},\"users_in_photo\":[],\"caption\":{\"created_time\":\"1449767584\",\"text\":\"test\",\"from\":{\"username\":\"blabla\",\"profile_picture\":\"https:\\/\\/scontent.cdninstagram.com\\/hphotos-xaf1\\/t51.2885-19\\/11906329_a.jpg\",\"id\":\"2318415211\",\"full_name\":\"\"},\"id\":\"1234\"},\"user_has_liked\":false,\"id\":\"1234\",\"user\":{\"username\":\"blabla\",\"profile_picture\":\"https:\\/\\/scontent.cdninstagram.com\\/hphotos-xaf1\\/t51.2885-19\\/1190970970_a.jpg\",\"id\":\"23234xxx\",\"full_name\":\"\"}}]}\r\nwhite:~ xxx$ \r\n```"}}