I'm trying to start with the API and stuck on very first step of logging in. Going by API documentation, I'm using below code to make a session:
kite = KiteConnect(api_key="your_api_key")
# Redirect the user to the login url obtained # from kite.login_url(), and receive the request_token # from the registered redirect url after the login flow. # Once you have the request_token, obtain the access_token # as follows.
data = kite.generate_session("request_token_here", api_secret="your_secret") kite.set_access_token(data["access_token"])
Do I need to do the kite.login_url() manually daily (if yes, then why)? Also after trying to successfully make websocket connection, now it's giving error "WebSocket closed: 1006 - connection was closed uncleanly (WebSocket connection upgrade failed (403 - Forbidden))"
Can someone please help me with some solution to overcome this issue.