It looks like you're new here. If you want to get involved, click one of these buttons!
url = 'https://api.kite.trade/session/token'
myheaders = {'X-Kite-Version': '3'}
data = {"api_key": api_key, "request_token": request_token, "checksum": sha_signature}
res = requests.post(url, json=data, headers=myheaders)
print (res.status_code)
print (res.raise_for_status())
Try using the pykiteconnect client library.
^ Points on debugging your issue
Bad request clearly means the request you are sending is some or the other way wrong. Try printing res.request.__dict__
* Change json param of post call to data as the former sets the content type as json.
* SHA signature might be wrong.