On requesting access token, the api returns:
{“status”:“Bad Request”,“result”:{“errors”:[{“message”:“Client id not received with the request. Check API documentation and content type of your request”,“code”:“Bad Request”}]}}
I am using the following code to request access token:
headers = {‘content-Type’: ‘application/json’,}
data = {‘grant_type’: ‘authorization_code’, ‘code’: authorization_code, ‘client_id’: client_id, ‘client_secret’: client_secret, ‘redirect_uri’: callback_uri}
access_token_response = requests.post(‘https://api.codechef.com/oauth/token’, headers=headers, data=data)
with appropriate values in place of authorization_code, client_id and client_secret, and callback_uri = “http://127.0.0.1:8000/”