Does logging into Kite (web/app) invalidate an active Kite Connect access_token mid-session?

Karimbaig5
Hi team,

I run an intraday algo on Kite Connect (Python). My daily flow:

Complete the login → request_token → access_token exchange once in the morning (single API key, single user).
Use that access_token for a KiteTicker WebSocket (live ticks) plus periodic REST calls (ltp, historical_data).
Today I hit an unexpected mid-session token invalidation:

Timeline (IST):

08:55 — generated a fresh access_token via the login flow. Everything worked — WebSocket streamed ticks, REST calls succeeded.
~13:39 — REST calls suddenly began failing with: TokenException (HTTP 403) — "Invalid api_key or access_token." (This is the same time I opened my Kite Mobile App for the first time today to check market)
14:25 — I re-ran the login flow to mint a new token, which resolved it.

Key point: my app generated no new access_token between 08:55 and 13:39 — I confirmed from my server logs that there were only two token-exchange events all day (08:55, and the 14:25 recovery). So the 08:55 token was invalidated without my app re-authenticating, even though I'd expect it to stay valid until ~06:00 the next day.

Questions:

1. Does an interactive login to Kite web/mobile with the same user invalidate an already-active Kite Connect API access_token?
2. Is there a single-active-session limit per user spanning the API and the consumer app? If so, which session wins?
Notably, my KiteTicker WebSocket kept streaming ticks fine even after REST started returning 403. Once connected, is the ticker session independent of the REST access_token?
3. What's the recommended pattern for running an intraday API session while still occasionally using the Kite app on the same account - or is a separate Zerodha account for the API the only clean solution?
Sign In or Register to comment.