Dear Friends I am new for this trading platform. I have zerodha account and bought 2000 credit and want to test the automatic trading through python code. Following code worked properly import logging from kiteconnect import KiteConnect logging.basicConfig(level=logging.DEBUG) kite = KiteConnect(api_key="xxxxxxxxxxxxxx")
Blew code is showing error data = kite.generate_session("access_token", api_secret="xxxxxxxxxxxxxxxxxxxxxxx") kite.set_access_token(data["access_token"])
This is the error 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 data = kite.generate_session("access_token", api_secret="xxxxxxxxxxxxxxxxxxxxxxxx") 2 kite.set_access_token(data["access_token"])
u got the solution then kindly post the solution i am also having same issue...
You can refer to this thread.