Invalid Token Exception

NewbieTrader
I tried using the Kite API both .Net and KiteXL (excel version). I am getting invalid token exception. Everything was working fine till last friday. I couldn't use it yesterday and today. Is there anything changed at your end.

My subscription is active till 3rd October.
  • rakeshr
    No, nothing is changed at our end. Can you paste a complete error stack trace, that should give more info?
  • NewbieTrader
    Please find the Error screen shot from KITE XL and .net api.


    Thanks
  • HowUTrade
    @NewbieTrader
    1.Make sure that you are using correct api key and secret. (check for any non alphanumeric characters in the credentials like spaces, line breaks etc.)
    2.Request token is valid only once and has expiry, make sure the request token is not expired or already used.
    3.If you are using our KiteXL, check whether you have valid license from us.

    KiteXL is built on KiteNet.dll which is independent of official .Net Library.
  • NewbieTrader
    @rakeshr
    I rechecked the API key and secret (no special characters or spaces/line breaks) and reset it again. But, same error has occurred. Please see below.

    [2021-09-08T15:17:37.1501598+05:30] [ERROR] - [Tag:] - [Location:] -
    Invalid `checksum`.
    KiteConnect.TokenException: Invalid `checksum`.
    at KiteConnect.Kite.Request(String Route, String Method, Object Params, Boolean json)


  • vishwesh
    @HowUTrade I too have this issue for the last few days , Is there any update from your side ? I am using KITEXL
  • vishwesh
    It was working till last week with same API credentials, so API credentials was not an issue
  • HowUTrade
    @vishwesh
    KiteXL is a standalone app, do you have valid license from us?
  • vishwesh
    @HowUTrade I am new to this forum , just seen some of your reply and get to know, kiteXL is paid one. I am ready to pay , but before that i wanted to try Official dotnet (free version) , can you send the link here?
  • vishwesh
    @HowUTrade got the link on my own ,thanks
  • NewbieTrader
    NewbieTrader edited September 10
    @rakeshr
    I am still getting the same error. Could you please check it?
    I just want to get Historical data. Please let me know if you have any other solution.
  • NewbieTrader
    @rakeshr
    Could you please respond?
  • sujith
    @NewbieTrader,
    KiteXL is a solution by @HowUTrade team, they can help you out with further details.
  • NewbieTrader
    @sujith
    This is not about KiteXL. Access token got failed even in the .net api. I have used correct key. It was working fine till 3rd september and after that it is not working.
  • sujith
    Can you paste the code and complete stack trace and also mention the official client library details as well?
  • NewbieTrader
    NewbieTrader edited September 15
    @sujith,
    I just downloaded the dot net code from GIT (https://github.com/zerodha/dotnetkiteconnect) and added my API credential. Login was success, but token exception occurred once I enter the request token. Please see below the error details.
    Thanks.

    Goto https://kite.trade/connect/login?api_key=XXXXXXX&v=3
    Enter request token:
    XXXXXX
    DEBUG: POST https://api.kite.trade/session/token
    api_key=XXXXXXX&request_token=XXXXXX&checksum=XXXXX
    DEBUG: Content-Type: application/x-www-form-urlencoded
    DEBUG: Content-Length: 145
    DEBUG: User-Agent: KiteConnect.Net/3.0.8.0
    DEBUG: X-Kite-Version: 3
    DEBUG: Authorization: token XXXXXX:
    DEBUG: 403 {"status":"error","message":"Invalid `checksum`.","data":null,"error_type":"TokenException"}

    Need to login again
    Invalid `checksum`.

  • rakeshr
    {"status":"error","message":"Invalid `checksum`.","data":null,"error_type":"TokenException"}
    Invalid `checksum`.
    You seem to be using the wrong checksum. You can check the .net official example here.
Sign In or Register to comment.