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 "access_token_ec2.py", line 106, in data = kite.generate_session(request_token, api_secret=key_secret[1]) File "/home/ec2-user/anaconda3/envs/algov5/lib/python3.7/site-packages/kiteconnect/connect.py", line 260, in generate_session "checksum": checksum File "/home/ec2-user/anaconda3/envs/algov5/lib/python3.7/site-packages/kiteconnect/connect.py", line 840, in _post return self._request(route, "POST", url_args=url_args, params=params, is_json=is_json, query_params=query_params) File "/home/ec2-user/anaconda3/envs/algov5/lib/python3.7/site-packages/kiteconnect/connect.py", line 912, in _request raise exp(data["message"], code=r.status_code) kiteconnect.exceptions.TokenException: Token is invalid or has expired.
File "access_token_ec2.py", line 110, in data = kite.generate_session(request_token, api_secret=key_secret[1]) File "/home/ec2-user/anaconda3/envs/algov5/lib/python3.7/site-packages/kiteconnect/connect.py", line 260, in generate_session "checksum": checksum File "/home/ec2-user/anaconda3/envs/algov5/lib/python3.7/site-packages/kiteconnect/connect.py", line 840, in _post return self._request(route, "POST", url_args=url_args, params=params, is_json=is_json, query_params=query_params) File "/home/ec2-user/anaconda3/envs/algov5/lib/python3.7/site-packages/kiteconnect/connect.py", line 912, in _request raise exp(data["message"], code=r.status_code) kiteconnect.exceptions.TokenException: Token is invalid or has expired.
data = kite.generate_session(request_token, api_secret=key_secret[1])
File "/home/ec2-user/anaconda3/envs/algov5/lib/python3.7/site-packages/kiteconnect/connect.py", line 260, in generate_session
"checksum": checksum
File "/home/ec2-user/anaconda3/envs/algov5/lib/python3.7/site-packages/kiteconnect/connect.py", line 840, in _post
return self._request(route, "POST", url_args=url_args, params=params, is_json=is_json, query_params=query_params)
File "/home/ec2-user/anaconda3/envs/algov5/lib/python3.7/site-packages/kiteconnect/connect.py", line 912, in _request
raise exp(data["message"], code=r.status_code)
kiteconnect.exceptions.TokenException: Token is invalid or has expired.