Receiving invalid token InputExeption for historical data api

swapkats
I'm using kiteconnect js sdk. I'm already subsribed to historical api addon. The library works fine for getting margins etc, but fails with invalid token error data for getHistoricData. Is there anything that I'm missing. Please help.
  • sujith
    You need to create a new access token after subscribing for historical data.
  • swapkats
    I've subscribed long back. Created lot of new access tokens since then. Do you mean new api key?
  • sujith
    No, you don't need a new API key. Can you run in debug mode and give me the exact status code and response message?
  • swapkats
    @sujith I've figured out the issue. I was using wrong instrument token format like 'NSE:INFY'. I mistook invalid token as access token issue. Historical data is working now. Thanks for quick reply.
This discussion has been closed.