Hi, I have my python client which was working fine till April 1st week. My API subscription has expired and renewed it an hour back and was trying to run the client and I am getting below error.
Nothing has changed on my client side. Can you please help what. Is this something to do with API on the server side?
user = kite.generate_session(request_token=request_token, api_secret=secret_api_key) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\kiteconnect-3.7.4-py3.6.egg\kiteconnect\connect.py", line 232, in generate_session File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\kiteconnect-3.7.4-py3.6.egg\kiteconnect\connect.py", line 701, in _post File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\kiteconnect-3.7.4-py3.6.egg\kiteconnect\connect.py", line 766, in _request kiteconnect.exceptions.TokenException: Invalid `checksum`.
data = kite.generate_session(request_token, api_secret=api_secret) 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 Traceback (most recent call last): File "", line 1, in File "C:\Users\Administrator\PycharmProjects\untitled\venv\lib\site-packages\kiteconnect-3.7.7-py3.7.egg\kiteconnect\connect.py", line 232, in generate_session "checksum": checksum File "C:\Users\Administrator\PycharmProjects\untitled\venv\lib\site-packages\kiteconnect-3.7.7-py3.7.egg\kiteconnect\connect.py", line 701, in _post return self._request(route, "POST", params) File "C:\Users\Administrator\PycharmProjects\untitled\venv\lib\site-packages\kiteconnect-3.7.7-py3.7.egg\kiteconnect\connect.py", line 766, in _request raise exp(data["message"], code=r.status_code) kiteconnect.exceptions.TokenException: Token is invalid or has expired.
Please help
(excuse me if this is not the correct thread. but my problem seems similar.. there is no other thread related to my problem)
i tried again. but still getting the error data = kite.generate_session(request_token, api_secret=api_secret) 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" 200 None
"TokenException: Invalid 'checksum'."
This issue is resolved.You can create access_token immediate post subscription/renew.
data = kite.generate_session(request_token, api_secret=api_secret)
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
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\Administrator\PycharmProjects\untitled\venv\lib\site-packages\kiteconnect-3.7.7-py3.7.egg\kiteconnect\connect.py", line 232, in generate_session
"checksum": checksum
File "C:\Users\Administrator\PycharmProjects\untitled\venv\lib\site-packages\kiteconnect-3.7.7-py3.7.egg\kiteconnect\connect.py", line 701, in _post
return self._request(route, "POST", params)
File "C:\Users\Administrator\PycharmProjects\untitled\venv\lib\site-packages\kiteconnect-3.7.7-py3.7.egg\kiteconnect\connect.py", line 766, in _request
raise exp(data["message"], code=r.status_code)
kiteconnect.exceptions.TokenException: Token is invalid or has expired.
Please help
(excuse me if this is not the correct thread. but my problem seems similar.. there is no other thread related to my problem)
data = kite.generate_session(request_token, api_secret=api_secret)
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" 200 None