With reference to the above thread, the issue seemed to have been solved but has re-appeared again.
The steps I performed are as follows -
Login to kite, get the request token from the redirect URL (say at 9 am)
Run the python script. Request and save the access token. Works correctly. (say 9.05)
Login into PI, execute some trades (9.15 - 9.30)
Run the python script with saved access token. Login works but if I try to get open positions, gives invalid token issue again. (step is performed after exiting from PI).
If I perform the same steps without logging into PI, it works multiple times without any token issues - positions are returned correctly.
I have tried clearing cookies before the last step but does not work.
Hi, If you login to PI your old session is cleared and new session is created. In order to keep your Kite Connect session alive, you will have to use Kite Web.
@DS4769 As soon as you login to app anything out of Kite ecosystem such as Nest, Pi, trade.zerodha.com your Kite session will be cleared and you need to regenerate access_token.
I see that even if I generate a new request token and then a access_token, it still says invalid token!
Is this clearly documented somewhere with the flows? (like if X happens, do Y) Did not find it in the existing documentation. Kindly point it to me if available.
@DS4769, We are planning to allow users to login on KiteConnect and all other platforms, but it will take some time to implement it. This is one of the reason it is not documented anywhere.
If you login to PI your old session is cleared and new session is created. In order to keep your Kite Connect session alive, you will have to use Kite Web.
Thanks
access_token
.I understand that now.
I see that even if I generate a new request token and then a access_token, it still says invalid token!
Is this clearly documented somewhere with the flows? (like if X happens, do Y) Did not find it in the existing documentation. Kindly point it to me if available.
We are planning to allow users to login on KiteConnect and all other platforms, but it will take some time to implement it. This is one of the reason it is not documented anywhere.
I am getting the login page through this. But where I will get the access token.
After login error is displayed as
The user is not enabled for the app, data null, error type input exception
How to resolve