Reputation: 91
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?
Upvotes: 9
Views: 4210
Reputation: 601
Use app_id
, and app_secret
.
For postman, put the body params in x-www-form-urlencoded
.
Upvotes: 0
Reputation: 520
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.
Upvotes: 9