zerodha / pykiteconnect

The official Python client library for the Kite Connect trading APIs
MIT License
978 stars 467 forks source link

Error with token generation #95

Closed augmen closed 3 years ago

augmen commented 3 years ago

My script used to work perfectly well till Nov 5. From today showing the error.

line 21, in kite_trade
self.kite_loginer.update_access_token()
line 39, in update_access_token
request_token = self._get_request_token()
line 65, in _get_request_token
return json.loads(resp.text)['token']
KeyError: 'token'
augmen commented 3 years ago

Myscript looks like this resp = s.get(KITE_CONNECT, params={'api_key': self.api_key}) return json.loads(resp.text)['request_token']

augmen commented 3 years ago

@vividvilla plz guide

vividvilla commented 3 years ago

Request token is supposed to be copied from redirect URL after successful Kite connect login flow. Seems like you are typing to automate it so I am not sure what you are doing wrong. You and ask your questions on Kite connect forum here.