Subject: Kite Connect Paid App – HTTP 403 TokenException During Access Token Generation

SBFS1234
Hello Zerodha Kite Connect Team,

I am developing a Windows desktop trading workstation using Python 3.11 and the official Kite Connect Python SDK 5.2.2.

My application details:

Subscription: Kite Connect Paid

App Status: Active

Zerodha Client ID: Verified correct

Redirect URL: http://127.0.0.1:8000

Zerodha Login: Successful

Request Token Callback: Received successfully

However, while exchanging a freshly generated request token using kite.generate_session(), the API returns:

HTTP Status: 403

Error Type: TokenException

I have also regenerated the API Secret and tested again with fresh credentials and a new login session. The issue persists.

Could you please advise how to determine whether this is an application/account authorisation issue or a token exchange issue?

Thank you.
Tagged:
  • SBFS1234
    please help me with it
  • salim_chisty
    The error message indicates that your request token might have expired. A request token, however, is valid for only a few minutes and can be used just once. To resolve this, you need to fetch a new request token and exchange it for an access token.
    Please note that the exchange mandates that traders log in manually at least once a day, and we do not recommend automating the login process.

    Here are the key details:
    - Access tokens are flushed daily at 7:30 AM, and new tokens are generated at 7:35 AM.
    - Ensure you generate the access token after 7:35 AM on the same trading day. The token will remain valid throughout the day unless you log out.

    Additionally, please follow the login flow as outlined in the Kite Connect API documentation. For further guidance, you can refer to this webinar.
Sign In or Register to comment.