Does Kiteconnect keep actual connection .

KiteConenct.generateSession(requestToken, apiSecret) need requestToken as parameter. Below comment says
/* The request token can to be obtained after completion of login process. Check out for more information. A request token is valid for only a couple of minutes and can be used only once. An access token is valid for one whole day. Don't call this method for every app run. Once an access token is received it should be stored in preferences or database for further usage. */
So we can't use this method, because for every time app re-opens we need new session, hence new login, which is not recommended.
If we don't , does below code opens and keep any IO connection or it just keeps connection information which will be used when we do a API call.

KiteConnect cn = new KiteConnect("api key);
cn.setAccessToken("access token" );
cn.setPublicToken( "public token" );
  • sujith
    All the Kite Connect APIs are authenticated using access tokens. When you re-run the app and set access token locally, the library will send it for every API call.
Sign In or Register to comment.