It looks like you're new here. If you want to get involved, click one of these buttons!
http_session = requests.Session()While doing so, I am facing,
url = http_session.get(url='https://kite.trade/connect/login?v=3&api_key='+ api_key).url
response = http_session.post(url='https://kite.zerodha.com/api/login', data={'user_id':user_id, 'password':user_password})
resp_dict = json.loads(response.content)
http_session.post(url='https://kite.zerodha.com/api/twofa', data={'user_id':user_id, 'request_id':resp_dict["data"]["request_id"], 'twofa_value':pyotp.TOTP(totp_key).now()})
url = url + "&skip_session=true"
response_url = http_session.get(url=url, allow_redirects=True).url
request_token = parse_qs(urlparse(response_url).query)['request_token'][0]
kite = KiteConnect(api_key=api_key)
data = kite.generate_session(request_token, api_secret=api_secret)
kite.set_access_token(data["access_token"])
https://github.com/rajivgpta/kite-api-autologin/blob/main/login.py
Zerodha saying we cannot autologin in an 2018 article, but I see many code links in recent times which claim to have done that. please clarify.