Get Request token from Python script after manually logging in to Zerodha.

Can any one share the code snippet to get the request token from the url please. I seen posts saying exchange mandates users to manually login at least once in a day. So here is what i want to do.
* Manually login into Zerodha mobile app (or i can do web if that is mandatory for getting request token). This i will do before trading starts in the morning probably after access token is refreshes (after 8:30)
* During the trading hour, I want my Python script to automatically get me the request token.
* I get the access token from request token and use it for the day

I have tried the following code,
url = kite.login_url()
response = requests.request('GET', url)
The response does not contain any request token.

Can some one please help me on this. Thanks in advance.
  • ccc
    Any one knows effective way of doing this with python API? Im running my script on AWS. Any help appreciated.
  • ganeshv02
    ganeshv02 edited June 23
    @ccc - I think, if you are logging in from your mobile, you need to hit this URL - "" with your API key. After you login, you will be able to see request_token in the address bar. Don't think logging in to Zerodha app would help. I may be wrong though. I am also looking for better way to make my python program pickup the request_token. Let me know if you find any.
Sign In or Register to comment.