headers

ZI4453
please make changes whereever i am mistaken

headers = {'Content-type': 'application/json'}
Login_kite_session='https://api.kite.trade/session/token'
data={"api_key":'123458',"request_token":'yyy986',"checksum":'zzz'}
response=requests.post(Login_kite_session,data=data,headers=headers)
print(response.text)

header_authorisation={'Content-type': 'application/json','Authorization': 'token xxx:yyy'}

check_profile='https://api.kite.trade/user/profile'
data={"api_key":'123458',"request_token":'yyy986',"checksum":'zzz'}
response_1=requests.post(Login_kite_session,data=data,headers=header_authorisation)
print(response_1.text)
  • ZI4453
    Updated session request-

    headers = {'Content-type': 'application/json','Version':'X-Kite-version: 3'}
    Login_kite_session='https://api.kite.trade/session/token'
    data={"api_key":'123458',"request_token":'yyy986',"checksum":'zzz'}
    response=requests.post(Login_kite_session,data=data,headers=headers)
    print(response.text)
  • sujith
    You can take a look at this here.
  • ZI4453
    i got above infor from there only..please confirm if placed headers properly.....rest i should be able to take care
    @sujith
Sign In or Register to comment.