Invalid API credentials!!!

apind81
apind81 edited October 2016 in Python client
Getting error "Invalid API credentials", when accessing historical data.
  • Vivek
    @apind81 Please check if you are using valid access_token and api_key
  • apind81
    apind81 edited October 2016
    @vivek I double checked, I was feeding the correct data, but still same error.
    Seems there is a problem with kite.trade

    Observed, some other users in the forum also facing the same problem when accessing the historical data!!!
  • Vivek
    Vivek edited October 2016
    @apind81 Please check if you are using valid access_token. Please check documentation
    TokenException

    Preceded by a 403 header, this indicates the expiry or invalidation of an authenticated session. This can be caused by the user logging out, a natural expiry, or the user logging into another Kite instance. When you encounter this error, you should clear the user’s session and re-initiate a login.
  • apind81
    apind81 edited October 2016
    @vivek I checked again, I tried the fresh access_token to avoid session expiry, still no luck!!!

    See the error below:


  • pankajrb
    We are stuck too. @vivek is helping out
  • pankajrb
    We are stuck too. @vivek is helping out
  • SAURABH
    @vivek I am also getting the same error. Please help!
  • kumar_krishnan
    @vivek I am also getting same error from Yesterday, I have tried after re-login, still it is not working.
  • virtualKG
    virtualKG edited October 2016
    @vivek - Facing issues with historical data call since yesterday as well... Tried with new access token, logged out of other instances, etc but no luck... Also - all other functions such as placeorder(), instruments(), etc are working fine with the same access token and API key combination...
  • Kailash
    Please throw away whatever access_token you have been using to access historical data until now. You need to do a fresh login, get a brand new access_token, and pass this new access_token to the historical APIs and it should work.
  • Kailash
    @apind81 @virtualKG -- you guys do not have the Historical data API subscription

    @kumar_krishnan - you haven't created a Connect app. You only have the publisher app. Unless you create a Connect app, you will not get access to any APIs.

    I'd like to clarify something. Historical API is not bundled with Connect as explained on the homepage and within your developer console. We'd disabled authentication on the historical data APIs for a while for legacy/testing reasons, but we re-enabled authentication recently. If you were accessing the historical APIs (without subscribing to it in your developer console), it's not going to work anymore unfortunately.
  • kumar_krishnan
    Thanks for clarifying @Kailash, infact I had connect and also publish Apps, I did not use connect much, so i have discontinued, Anyway it means going forward Publisher App will not be able to pull historical Data. as per the developer console "No API access. HTML/Javascript buttons and basket.", in that case if I need to pull historical data, I need to continue on Connect APP is my understanding correct?
  • Matti
    @kumar_krishnan The Connect API will give you live data via the websockets. You'll have to subscribe to the Historical Data API to pull historical data.
  • kumar_krishnan
    @Nikhil.A , You mean to say ,using connect API, I cannot pull historical data any more, that means Connect API is only trading API with realtime websocket data (No Historical data) . In that case Is it possible to subscribe only for historical data from console.
  • Kailash
    @kumar_krishnan Historical data has always been a separate addon to Kite Connect. You were not meant to pull data from it without subscribing to the Historical addon (but as I said, we'd left it open for a while for technical reasons).

    I'm afraid it's an addon to Kite Connect, so subscribing to just the data is not possible.
Sign In or Register to comment.