Can't authorize

I got this message

{"status":"error","errors":[{"errorCode":"","message":"Required String parameter 'client_id' is not present","propertyPath":"client_id","invalidValue":null,"error_code":"","property_path":"client_id","invalid_value":null}]}

here is my code

 import requests

url = ""

    'code': code,
    'client_id': apiKey
    'client_secret': secretKey,
    'redirect_uri': rurl,
headers = {'Api-Version':'2.0'}

response = requests.request("GET", url, headers=headers, data=payload)


pay load

{'code': 'dtRlWO',
 'client_id': '64bdc776-95fd-491f-bbde-d4007c08c5fb',
 'client_secret': 'yq781r2sot',
 'redirect_uri': 'https%3A%2F%2F127.0.0.1%3A3000',
 'grant_type': 'authorization_code'}


In the code you provided, the items in payload are being sent as the body of the request, not as request parameters. For this API, you should send the data as request parameters, not in the body. Please make this change and try again.


1 Like