Access token issues

DS4769

https://kite.trade/forum/discussion/1104/access-token-problems#latest

Hi Sujith,

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 -
  1. Login to kite, get the request token from the redirect URL (say at 9 am)
  2. Run the python script. Request and save the access token. Works correctly. (say 9.05)
  3. Login into PI, execute some trades (9.15 - 9.30)
  4. 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.
  • sujith
    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
    Does that mean that after connecting and sxiting PI, I have to connect to Kite Web again?
    Thanks
  • Vivek
    @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.
  • DS4769
    Vivek,

    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.
  • sujith
    sujith edited February 2017
    @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.
  • Riya
    https://kite.zerodha.com/connect/login?api_key=jqcz8jsxj0mblwwl


    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
  • rakeshr
    The user is not enabled for the app, data null, error type input exception
    Go through the login FAQs here.
Sign In or Register to comment.