When I'm trying to receive an access_token from Instagram.
I do the following request
params = {
'client_id' : config.INSTAGRAM_APP_ID,
'client_secret' : config.INSTAGRAM_APP_SECRET_KEY,
'grant_type' : 'authorization_code',
'redirect_uri' : '`my localhost`',
'code' : code
}
r = requests.post('https://api.instagram.com/oauth/access_token', params = params)
And receive error:
{"code": 400, "error_type": "OAuthException", "error_message": "You must provide a client_id"}
What can I do with these?
I fixed this by putting these params in the (x-www-form-encoded) body instead of in the header (credit to https://github.com/request/request/issues/983#issuecomment-57005849 for the idea).
NB: I am not using the python wrapper.
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