It looks like you're new here. If you want to get involved, click one of these buttons!
Exception in thread "main" com.rainmatter.kitehttp.exceptions.KiteNoNetworkExceptionMy code is
at com.rainmatter.kitehttp.KiteRequest.postRequest(KiteRequest.java:57)
at com.rainmatter.kiteconnect.KiteConnect.requestAccessToken(KiteConnect.java:176)
at FinalDestination.main(FinalDestination.java:36)
public class FinalDestination {
public static void main(String []args) throws JSONException, KiteException {
KiteConnect kiteSdk = new KiteConnect("api_key");
kiteSdk.setUserId("user_id");
//String url = kiteSdk.getLoginUrl();
//System.out.println(url);
// Get accessToken as follows,
UserModel userModel = kiteSdk.requestAccessToken("request_token", "secret_key");
kiteSdk.setAccessToken(userModel.accessToken);
kiteSdk.setPublicToken(userModel.publicToken);
Margins margins = kiteSdk.getMargins("equity");
System.out.println(margins.available.cash);
}
}
I have got the request token but facing problem while getting access token .
A request token is valid for a couple of minutes and can be used only once.
You need to wrap your code inside try block and print kiteException.message which will give us more info.
requestAccessToken
for every run.I am getting connection error again . I just updated the request token also because you said it might have expired .
Do i have to update the api key and api secret also ? .
Here is my code :
I am not sure where you are going wrong.
You can check out webinar for login flow.
Is there any support team with whom i can talk ?
We don't provide phone support for Kite Connect.
You can follow the exact procedure as shown in the webinar and private message me that. I will check and get back to you.