Session Expired

Srikrishna_Rowthu
Hi,

In the first attempt, I was able to retrieve the userName using getProfiles().
After that, every attempt, I was getting below error even after trying with new AccessToken(s). I checked apikey and accessToken multiple times and they seem fine. I am using latest version of kite connect 3.1.0

I even deleted the app and then created a new one and used the new apiKey and then generated accessToken and tried with them. Even that doesn't seem to be working. Need some help here. Thanks in advance.


I get this below error:
session expired
Incorrect `api_key` or `access_token`. 403 com.zerodhatech.kiteconnect.kitehttp.exceptions.TokenException

Thanks
Srikrishna
  • Srikrishna_Rowthu
    I figured out the issue now. This answer might be helpful to others too.

    There is 1 program which will get the apiSecret and publicKey and 2nd program will use these. I am passing these to 2nd program. However, in the first program, before completion, I am logging out, which will kill the session, which is why I am getting this exception continously.

    I was actually thinking that in the 1st program, we logging out and we login in again in the 2nd program. But that's not the case, once u get the apiSecret and publicKey, these details are stored in a session along with the userId and hence one shouldn't logout there. Then they can use these details in other program and once they logout anywhere they need to regenerate apiSecret again.
Sign In or Register to comment.