URGENT HELP NEEDED: kiteconnect.exceptions.TokenException: Invalid 'checksum'

toughguy
Hi,
I have my python client which was working fine till April 1st week. My API subscription has expired and renewed it an hour back and was trying to run the client and I am getting below error.

Nothing has changed on my client side. Can you please help what. Is this something to do with API on the server side?

user = kite.generate_session(request_token=request_token, api_secret=secret_api_key)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\kiteconnect-3.7.4-py3.6.egg\kiteconnect\connect.py", line 232, in generate_session
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\kiteconnect-3.7.4-py3.6.egg\kiteconnect\connect.py", line 701, in _post
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\kiteconnect-3.7.4-py3.6.egg\kiteconnect\connect.py", line 766, in _request
kiteconnect.exceptions.TokenException: Invalid `checksum`.

Process finished with exit code 1
  • Sudheer
    Hi, I Am Also Facing Same Issue.. My API Subscription Got Expired and Renewed Same.. Now i Am Facing Same Error..

    "TokenException: Invalid 'checksum'."
  • rakeshr
    @toughguy and @Sudheer
    This issue is resolved.You can create access_token immediate post subscription/renew.
  • toughguy
    @rakeshr My client is working fine now. Hope this things are taken care going forward. Thanks
  • pradeepXp
    Hi I am facing Issues with connection:

    data = kite.generate_session(request_token, api_secret=api_secret)
    DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.kite.trade:443
    DEBUG:urllib3.connectionpool:https://api.kite.trade:443 "POST /session/token HTTP/1.1" 403 None
    Traceback (most recent call last):
    File "", line 1, in
    File "C:\Users\Administrator\PycharmProjects\untitled\venv\lib\site-packages\kiteconnect-3.7.7-py3.7.egg\kiteconnect\connect.py", line 232, in generate_session
    "checksum": checksum
    File "C:\Users\Administrator\PycharmProjects\untitled\venv\lib\site-packages\kiteconnect-3.7.7-py3.7.egg\kiteconnect\connect.py", line 701, in _post
    return self._request(route, "POST", params)
    File "C:\Users\Administrator\PycharmProjects\untitled\venv\lib\site-packages\kiteconnect-3.7.7-py3.7.egg\kiteconnect\connect.py", line 766, in _request
    raise exp(data["message"], code=r.status_code)
    kiteconnect.exceptions.TokenException: Token is invalid or has expired.

    Please help

    (excuse me if this is not the correct thread. but my problem seems similar.. there is no other thread related to my problem)
  • sujith
    A 403 means your session is expired you need to create a new access token.
  • sujith
    You can know more here.
  • pradeepXp
    i have tried that. this is happening everytime.
  • pradeepXp
    that's my question why the session is getting expired. the token must remain valid for a whole day.
  • pradeepXp
    i tried again. but still getting the error
    data = kite.generate_session(request_token, api_secret=api_secret)
    DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.kite.trade:443
    DEBUG:urllib3.connectionpool:https://api.kite.trade:443 "POST /session/token HTTP/1.1" 200 None
  • sujith
    You can check out this thread.
Sign In or Register to comment.