Hi, I created a new app and attempted to login to my account. I was able to generate the access token, and when i use it immediately, it still says token invalid and expired.
User id: VH7775
Error in console INFO: server: cloudflare Mar 09, 2023 2:39:35 PM okhttp3.internal.platform.Platform log INFO: cf-ray: 7a522e052f432e9c-HYD Mar 09, 2023 2:39:35 PM okhttp3.internal.platform.Platform log INFO: alt-svc: h3=":443"; ma=86400, h3-29=":443"; ma=86400 Mar 09, 2023 2:39:35 PM okhttp3.internal.platform.Platform log INFO: Mar 09, 2023 2:39:35 PM okhttp3.internal.platform.Platform log INFO: {"status":"error","message":"Token is invalid or has expired.","data":null,"error_type":"TokenException"} Mar 09, 2023 2:39:35 PM okhttp3.internal.platform.Platform log INFO: Code The error is being raised at the "GenerateSession" invocation.
KiteConnect kiteConnect = new KiteConnect(apiKey, true); kiteConnect.setUserId(userId); // Get login URL String url = kiteConnect.getLoginURL();
try { User user = kiteConnect.generateSession(sessionId, apiSec);
I have read the faq's and login page documentation mutliple times, but still missing why such logouts are happening. Hence i have posted a discussion. Please do not redirect to the same login page documentation. Thank you.
If possible, could someone post a sample code, wherein they hit the historical API for different instruments in a For Loop, which should be hardly around 10-15 lines. Thank you.
wherein they hit the historical API for different instruments in a For Loop, which should be hardly around 10-15 lines. Thank you.
Your query is answered here.