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 - I think, if you are logging in from your mobile, you need to hit this URL - "https://kite.zerodha.com/connect/login?v=3&api_key=xxx" 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.
I found a solution. Check this out - https://github.com/vinaykachare/ZerodhaRequestToken/blob/master/GetUserSession.py
Inside GetUserSession.py file you will have to update the "pin" section, as this repo is old. Let me know if you need help with that.
OS - MacOS