Access key and Token issue while accessing Historical data

smallampooty
I am able to get the list of instruments with api_key and access_token successfully. But within the same program, while I try to access the historical data, I am getting below error message.

kiteconnect.exceptions.TokenException: Incorrect `api_key` or `access_token`.

I have activated the Historical access today only.
I have the same issue when I try to access the streaming data.
  • smallampooty
    Can someone please help me with this? Has anyone placed similar issue where is working for instruments and not working for others in the same piece of code?
  • smallampooty



    The first file is the code and second is the output. It is printing the instrument count with the same access keys, but is giving error for getting a quote, historical data or streaming.

    If anyone can throw some light on this that would be of great help.

    If there a technical support team from Kite? If so, how do we reach out to them? Thank you.
  • sujith
    The instruments file doesn't authenticate, hence you are getting the response. For other API calls, you need to create a new access token.
  • smallampooty
    Thank you. I was using request_token as access_token and missing one step. This is working now.
This discussion has been closed.