Auto login

mohanarakere
Hi,

How to login to kite connect automatically through java program. As of now, it is manual.

KiteConnect kite = new KiteConnect(API_KEY);
kite.setUserId(USER_ID);
String loginURL = kiteSdk.getLoginURL();
User user = kite.generateSession(requestAccessToken, apiSecret);
kite.setAccessToken(user.accessToken);
kite.setPublicToken(user.publicToken);

Here, as of now, I have to paste login url in browser and provide login credentials and should get the request token.

but, I want to get requestAccessToken through program without pasting the login url in browser.

Is it possible to help here.

Thanks in advance
  • sujith
    It is mandatory by the exchange that a user has to log in manually at least once a day. We don't recommend automating login.
  • sujith
    If you wish to copy request token from the URL then you need to listen to url changes by setting some kind of lister to your browser control or webview and pick the url query params with the key request_token.
This discussion has been closed.