☰
Login
Signup
Home
›
API clients
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In
Register
Categories
Recent Discussions
Activity
Categories
13.9K
All Categories
0
Incidents
154
Node JS client
40
Go client
793
.Net API client
378
Kite Publisher
537
.Net / VBA / Excel (3rd party)
457
Algorithms and Strategies
994
Java client
1.1K
API clients
404
PHP client
4K
Python client
346
Mobile and Desktop apps
1.4K
Market data (WebSockets)
3.3K
General
In this Discussion
February 2021
jharames
February 2021
rakeshr
February 2021
sudarshan1413
February 2021
nakrj
python api generate_session shows error for checksum but no way to control it
jharames
February 2021
in
API clients
data = kite.generate_session(requestToken, apiSecret)
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.kite.trade:443
DEBUG:urllib3.connectionpool:
https://api.kite.trade:443
"POST /session/token HTTP/1.1" 403 None
---------------------------------------------------------------------------
TokenException Traceback (most recent call last)
in
1 requestToken='request token' <- masked by me
----> 2 data = kite.generate_session(requestToken, apiSecret)
~/opt/anaconda3/lib/python3.7/site-packages/kiteconnect/connect.py in generate_session(self, request_token, api_secret)
257 "api_key": self.api_key,
258 "request_token": request_token,
--> 259 "checksum": checksum
260 })
261
~/opt/anaconda3/lib/python3.7/site-packages/kiteconnect/connect.py in _post(self, route, url_args, params, is_json)
828 def _post(self, route, url_args=None, params=None, is_json=False):
829 """Alias for sending a POST request."""
--> 830 return self._request(route, "POST", url_args=url_args, params=params, is_json=is_json)
831
832 def _put(self, route, url_args=None, params=None, is_json=False):
~/opt/anaconda3/lib/python3.7/site-packages/kiteconnect/connect.py in _request(self, route, method, url_args, params, is_json)
896 # native Kite errors
897 exp = getattr(ex, data["error_type"], ex.GeneralException)
--> 898 raise exp(data["message"], code=r.status_code)
899
900 return data["data"]
TokenException: Invalid `checksum`.
Tagged:
python checksum generate_session
nakrj
February 2021
TokenException: Invalid 'CheckSum' being reported even for correct api key and secret. Kindly, resolve ASAP.
sudarshan1413
February 2021
edited February 2021
Even I am facing the same issue. I just created new App on 22nd Feb 2021. App is not even saving Re-Generated secret and showing Server Error 500.
image.png
18K
nakrj
February 2021
@rakeshr
Is there a problem with the API ? Getting TokenException:invalid checksum errors. Kindly, have it checked.
rakeshr
February 2021
@nakrj
This is fixed, you can try re-generating successful access_token now.
jharames
February 2021
Works fine now, thanks.
This discussion has been closed.
This is fixed, you can try re-generating successful access_token now.