I just acquired a kite developer account. I am trying to connect to kite using the code below.
downloaded kiteconnectjs from https://github.com/zerodhatech/kiteconnectjs
var KiteConnect = require("kiteconnect").KiteConnect;
var kc = new KiteConnect({
api_key: "api_key"
});
kc.generateSession("request_token", "api_secret")
.then(function(response) {
init();
})
.catch(function(err) {
console.log(err);
});
function init() {
kc.getMargins()
.then(function(response) {
})
.catch(function(err) {
});
}
However during generateSession call it is failing with the following exception
{ status: 'error',
message: 'Token is invalid or has expired.',
data: null,
error_type: 'TokenException' }
I am replacing api_key and api_secret with the corresponding key and secret of my app
Do we need to replace the "request_token" value passed in generateSession and if YES how do we generate the value.
Here https://kite.trade/forum/discussion/3620/how-many-instruments-can-we-subscribe-maximum-using-kite-connect-3-0#latest
it was mentioned, kite will reduce the number of connections to 1.
Is it still the case?
No I logged in using normal userId password which i had for zerodha account
Username is xcbbdh
Then I created the Kite APP and when I am going to https://kite.zerodha.com/connect/login?api_key={my_api_key} it is failing with the above error. (Thi…