Q:

Instagram API OauthException: "You must provide a client_id"

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?

A:

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.

