TokenException - Invalid API credentials

aryan
I am trying to get historical 30 minute candle data for a company e.g. reliance but i am getting this an HTTP error code 403, with the following error stream -> {"status": "error", "error_type": "TokenException", "message": "Invalid API credentials"}.

The url i am trying to hit is-> https://api.kite.trade/instruments/historical/738561/30minute?from=2017-01-28&to=2017-02-03&api_key=&access_token=35dec5hv5y9cdnav0hdbbo3j5cki1062

with my-api-key is actually my api's key.
  • sujith
    @aryan, I don't see any app registered with your email. Can you private message me your api_key?
  • sujith
    Hi @aryan,
    You don't have Kite Connect app. You only have Kite Publisher app. Create a Kite Connect app and also subscribe for historical data to access this API.
  • ruchanavjyot1907
    @sujith I am facing similar issue today morning, my subscription expired yesterday and I have created new app (with new api keys) and it is showing me 'Active' status on portal however Kite system is throwing 'invalid credential' error while trying to access it via API.
  • sujith
    @ruchanavjyot1907, Can you private message your new api_key?
  • ruchanavjyot1907
    I have provided all the required information, please resolve this at earliest. It seems few more people are reporting similar kind of issues.
  • sujith
    @ruchanavjyot1907, We haven't updated anything on login module. This shouldn't be happening. I will check and get back to you, please send a request token.
  • sunny
    @sujith - I am getting similar issue. more annoying part is - this issue is random. If I request historical data for 10 quotes, I get it for 2-3 only and for rest it throws me error. Can you suggest any solution ?
  • sujith
    @sunny,
    Can you paste the error message and status code?
  • sunny
    403 - "{\"status\": \"error\", \"error_type\": \"TokenException\", \"message\": \"Invalid API credentials\"}"
  • tonystark
    Hi @sunny,

    Which API client are you using?

    If you are continuously requesting data for 10 instruments you might get rate limited. The limit is 3 requests/second.
Sign In or Register to comment.