HI all, I am facing the following error while retrieving access token File "C:\Users\admin\Anaconda3\lib\site-packages\kiteconnect\__init__.py", line 684, in _request raise(exp(data["message"], code=r.status_code))
TokenException: Invalid session credentials
Code that i used to get the token as below.... pls help .. thanks
I upgraded my API version... however i get the following error now...
TokenException: Token is invalid or has expired.
File "", line 1, in runfile('C:/Users/admin/Desktop/KiteConnect/Connection_attempt.py', wdir='C:/Users/admin/Desktop/KiteConnect')
File "C:\Users\admin\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 710, in runfile execfile(filename, namespace)
File "C:\Users\admin\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 101, in execfile exec(compile(f.read(), filename, 'exec'), namespace)
File "C:/Users/admin/Desktop/KiteConnect/Connection_attempt.py", line 29, in data = kite.generate_session(public_token, api_secret)
File "C:\Users\admin\Anaconda3\lib\site-packages\kiteconnect-3.7.0b10-py3.6.egg\kiteconnect\connect.py", line 228, in generate_session "checksum": checksum
File "C:\Users\admin\Anaconda3\lib\site-packages\kiteconnect-3.7.0b10-py3.6.egg\kiteconnect\connect.py", line 697, in _post return self._request(route, "POST", params)
File "C:\Users\admin\Anaconda3\lib\site-packages\kiteconnect-3.7.0b10-py3.6.egg\kiteconnect\connect.py", line 762, in _request raise exp(data["message"], code=r.status_code)
You can check out more details about the TokenException here.
now i am getting the below error
AttributeError: 'KiteConnect' object has no attribute 'generate_session'
https://github.com/zerodhatech/pykiteconnect
thank you !
I tried using the command - pip install kiteconnect --upgrade --pre
however it still is giving me the same version.. @sujith pls help !!!!
TokenException: Token is invalid or has expired.
File "", line 1, in
runfile('C:/Users/admin/Desktop/KiteConnect/Connection_attempt.py', wdir='C:/Users/admin/Desktop/KiteConnect')
File "C:\Users\admin\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 710, in runfile
execfile(filename, namespace)
File "C:\Users\admin\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 101, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)
File "C:/Users/admin/Desktop/KiteConnect/Connection_attempt.py", line 29, in
data = kite.generate_session(public_token, api_secret)
File "C:\Users\admin\Anaconda3\lib\site-packages\kiteconnect-3.7.0b10-py3.6.egg\kiteconnect\connect.py", line 228, in generate_session
"checksum": checksum
File "C:\Users\admin\Anaconda3\lib\site-packages\kiteconnect-3.7.0b10-py3.6.egg\kiteconnect\connect.py", line 697, in _post
return self._request(route, "POST", params)
File "C:\Users\admin\Anaconda3\lib\site-packages\kiteconnect-3.7.0b10-py3.6.egg\kiteconnect\connect.py", line 762, in _request
raise exp(data["message"], code=r.status_code)
TokenException: Token is invalid or has expired.