Unhandled rejection StatusCodeError: 403 - "{\"status\":\"error\",\"message\":\"Token is invalid or has expired.\",\"data\":null,\"error_type\":\"TokenExcepti at new StatusCodeError (C:\vivekblocklyproject\node_modules\request-promise-core\lib\errors.js:32:15) at C:\vivekblocklyproject\node_modules\request-promise-core\lib\plumbing.js:97:41 at tryCatcher (C:\vivekblocklyproject\node_modules\request-promise\node_modules\bluebird\js\release\util.js:16:23) at Promise._settlePromiseFromHandler (C:\vivekblocklyproject\node_modules\request-promise\node_modules\bluebird\js\release\promise.js:512:31) at Promise._settlePromise (C:\vivekblocklyproject\node_modules\request-promise\node_modules\bluebird\js\release\promise.js:569:18) at Promise._settlePromiseCtx (C:\vivekblocklyproject\node_modules\request-promise\node_modules\bluebird\js\release\promise.js:606:10) at Async._drainQueue (C:\vivekblocklyproject\node_modules\request-promise\n
my code is :- var KiteTicker = require("./views/scripts/kiteconnect").KiteTicker; var ticker = new KiteTicker("**************", access_token);
Unhandled rejection StatusCodeError: 403 - "{\"status\":\"error\",\"message\":\"Token is invalid or has expired.\",\"data\":null,\"error_type\":\"TokenExcepti at new StatusCodeError (C:\vivekblocklyproject\node_modules\request-promise-core\lib\errors.js:32:15) at C:\vivekblocklyproject\node_modules\request-promise-core\lib\plumbing.js:97:41 at tryCatcher (C:\vivekblocklyproject\node_modules\request-promise\node_modules\bluebird\js\release\util.js:16:23) at Promise._settlePromiseFromHandler (C:\vivekblocklyproject\node_modules\request-promise\node_modules\bluebird\js\release\promise.js:512:31) at Promise._settlePromise (C:\vivekblocklyproject\node_modules\request-promise\node_modules\bluebird\js\release\promise.js:569:18) at Promise._settlePromiseCtx (C:\vivekblocklyproject\node_modules\request-promise\node_modules\bluebird\js\release\promise.js:606:10) at Async._drainQueue (C:\vivekblocklyproject\node_modules\request-promise\n
Make sure, you are using latest Kite Connect Javascript client version. You can check version of kiteconnect JS client by npm list --depth=0, it should be [email protected], if not ,then try installing latest version by npm install kiteconnect@beta.
same error ,before this i am using the latest latest Kite Connect Javascript client version 3 and after reinstalling i am getting the same error @rakeshr
i am not using client id as the new document is suggesting to use access token.
kindly make me clear weather to use client id or accesstoken @rakeshr
.then(function (res) {
var access_token = res.data.access_token
kc.setAccessToken(access_token);
console.log(access_token);
this is the access token i am using which is of 32 character @rakeshr
at new StatusCodeError (C:\vivekblocklyproject\node_modules\request-promise-core\lib\errors.js:32:15)
at C:\vivekblocklyproject\node_modules\request-promise-core\lib\plumbing.js:97:41
at tryCatcher (C:\vivekblocklyproject\node_modules\request-promise\node_modules\bluebird\js\release\util.js:16:23)
at Promise._settlePromiseFromHandler (C:\vivekblocklyproject\node_modules\request-promise\node_modules\bluebird\js\release\promise.js:512:31)
at Promise._settlePromise (C:\vivekblocklyproject\node_modules\request-promise\node_modules\bluebird\js\release\promise.js:569:18)
at Promise._settlePromiseCtx (C:\vivekblocklyproject\node_modules\request-promise\node_modules\bluebird\js\release\promise.js:606:10)
at Async._drainQueue (C:\vivekblocklyproject\node_modules\request-promise\n
@rakeshr
You can check version of kiteconnect JS client by
npm list --depth=0
, it should be[email protected]
, if not ,then try installing latest version bynpm install kiteconnect@beta
.and after reinstalling i am getting the same error @rakeshr