@sujith & @Vivek //UserModel userModel = kiteconnect.requestAccessToken("xxxxxxxx", "xxxxxxx");// we have both api_key and api_secret .. using login process we gets request token from redirected URL .. there no public token
After calling the requestAccessToken function you will get complete user session info in the userModel variable. You will get the public token from userModel.publicToken variable.
You need to have api_key and api_secret to get public token. For api_key and api_secret you need to create a KiteConnect App.
Example for getting public token and usage of websocket is here https://github.com/rainmattertech/javakiteconnect/tree/master/sample/src
UserModel userModel = kiteconnect.requestAccessToken("xxxxxxxx", "xxxxxxx");
requestAccessToken
function you will get complete user session info in the userModel variable. You will get the public token fromuserModel.publicToken
variable.