Implement Kite Connect in a typical web application
masterIn a web application where instances are created per HTTP request, you must initialize a new KiteConnect instance for every user to maintain individual authentication.
Typical Workflow:
- Initialize a
KiteConnectinstance. - Redirect the user to the
login_url(). - At your redirect URL endpoint, extract the
request_tokenfrom the query parameters. - Initialize a new
KiteConnectinstance and usegenerateSession()(or the equivalent token exchange) to obtain theaccess_tokenand user data. - Store the
access_tokenin a session. - For subsequent API calls, initialize a new
KiteConnectinstance using the storedaccess_token.