Instagram api keep raise "You must provide client_id exception" when I use python-instagram library

I registered my application in the instagram developer dashboard and tried using the python-instagram library created by Facebook.

After running the sample_app.py code, I turned to my test site (localhost: 8515) and successfully logged in using my instagram ID. However, I cannot get the access code because of this exception "You must provide client_id"

I also tried using this library ( https://github.com/Seraphicer/python-instagram-ext ) This is due to the fact that they pull out the requested source library and support it.

+7
python instagram-api
source share
2 answers

I resorted to this myself; failed to get python-instagram to work. There will probably be a rope throughout the library. There seem to be too many bugs lately and this is not supported, I think.

@classmethod def exchange_code_for_access_token(cls, code, redirect_uri, **kwargs): url = u'https://api.instagram.com/oauth/access_token' data = { u'client_id': cls.get_client_id(), u'client_secret': cls.get_client_secret(), u'code': code, u'grant_type': u'authorization_code', u'redirect_uri': redirect_uri } response = requests.post(url, data=data) account_data = json.loads(response.content) return account_data 
+9
source share

There was the same problem, obviously due to an instagram api or httplib2 update. Fixed for me https://github.com/vgavro/python-instagram/commit/9dfc264571ad7c343af3899445d13afedf23e3aa (link to my python-instagram fork with fixes necessary for me)

+11
source share

All Articles