Getting Request token

nknaveen328
nknaveen328 edited January 2018 in Python client
How do i get the request token after a successful login ? The response URL doesn't contain status or request token but contains sess_id and api key Here is what i am trying do

kite = KiteConnect(api_key=api_key)
print(kite.login_url())

browser = mechanicalsoup.StatefulBrowser()
login_res = browser.open(kite.login_url())
print(login_res.__attrs__)
print(login_res.url)

I am getting the request token by manually entering the Login url in the browser. But is this how it works ? or is there any automated way to get the request token ?
  • sujith
    Hi,
    It is mandatory by the exchange that a user has to log in manually at least once in a day. We don't recommend automating login.
  • nknaveen328
    but how long the access token is valid ? for 24 hours ?
  • sujith
    Yes, an access token is valid for one whole day unless you use any of the other platforms like Pi or Nest.
    It may also be invalidated if you log out of any of our platforms.
Sign In or Register to comment.