invalid checksum

rqm743
Dear Zerodha Kite Connect Support Team,

I am facing a persistent **“TokenException: Invalid 'checksum'”** error while generating an access token for my Kite Connect application.

My application details are as follows:

* **App Name:** MY STOCK SCANNER
* **App Status:** Active
* **API Type:** Connect + Historical Chart Data
* **Redirect URL:** http://localhost:8000
* **Programming Language:** Python
* **SDK:** Official KiteConnect Python SDK
* **Environment:** Google Colab

I have completed the Zerodha login and authorization process successfully. After authorization, I receive a request token through the redirect URL. However, when I try to exchange the request token for an access token using `kite.generate_session()`, the following error occurs:

`kiteconnect.exceptions.TokenException: Invalid 'checksum'`

I have already checked the following:

1. The Kite Connect application is active.
2. The API key length is 16 characters.
3. The API secret length is 32 characters.
4. The request token is freshly generated and has a length of 32 characters.
5. I have checked for leading or trailing spaces in the credentials.
6. I am using the official Python KiteConnect SDK.
7. I have verified that the SHA-256 checksum calculation follows the documented formula: `api_key + request_token + api_secret`.
8. I have repeated the login and authorization process several times, but the same error persists.

Since the authorization process succeeds but the session-token exchange consistently fails, I request your technical team to investigate whether there is any issue with my application's API credential mapping or session-token authentication.

Please advise if any additional verification, configuration change, or diagnostic information is required from my side.

My objective is to complete authentication and use Kite Connect market data for a stock-scanning application.

Thank you for your assistance.

Regards,
MY STOCK SCANNER Developer
  • salim_chisty
    We have checked this on our end and could not identify any issue. An Invalid checksum error generally indicates that the api_key, api_secret, or request_token being used is incorrect or does not correspond to the same authentication session. We have verified the Python SDK and found no issues.

    Please try generating the access token using a standalone login script instead of your application. This will help isolate whether the issue is related to the credentials or your application's authentication flow.

    We recommend following the login flow as outlined in the Kite Connect API documentation. Additionally, you can refer to this webinar for a detailed walkthrough.
Sign In or Register to comment.