Troubleshooting already done: 1. Confirmed no duplicate/leftover process holding another connection (ps aux clean) 2. Confirmed constructor argument order is correct: KiteTicker(api_key, access_token) — matches library signature (pykiteconnect 5.2.1) 3. Generated a completely fresh access_token via auth.py and retried — same 403 4. Waited several minutes in case of temporary rate-limiting — same 403 5. Confirmed this isn't a static IP issue (per docs, WebSocket data is exempt from the SEBI static IP requirement — only order placement needs it) 6. Tested with a completely minimal, bare-bones WebSocket connection (just KiteTicker + on_connect + on_ticks, no other code, no other files) — same 403 error. This confirms it's not an application-level bug.
Since HTTP endpoints authenticate fine with this exact token but WebSocket specifically rejects it, this looks like it could be a permission/activation issue specific to the WebSocket endpoint on my app. Could someone from the team take a look? Happy to share my API key (not secret) if needed for lookup.
A 403 generally means the session expired or permission was not granted for initiating the WebSocket connection. Make sure you have created a Kite Connect app on the Developer Console and not a Kite personal app. To verify this, please check the type of your app in the Developer Console and ensure that you are using the correct api_key associated with your paid Kite Connect application.
We have checked this and verified at our end, and we didn't observe any issue with the WebSocket tick data. Please review the WebSocket example code and ensure you are using the correct instrument token from the instrument list to check for any errors. Additionally, you can refer to the Python WebSocket streaming FAQs for further guidance.
The VPS public IP is also whitelisted in the Kite Connect Developer Console.
Since REST APIs work with the same fresh access token but the minimal KiteTicker WebSocket still receives HTTP 403, could you please check whether there is any server-side WebSocket permission/restriction on my Kite Connect application or account?
I have not included my API key, API secret, or access token for security reasons.
api_keyassociated with your paid Kite Connect application.We have checked this and verified at our end, and we didn't observe any issue with the WebSocket tick data.
Please review the WebSocket example code and ensure you are using the correct instrument token from the instrument list to check for any errors. Additionally, you can refer to the Python WebSocket streaming FAQs for further guidance.
I have verified the points mentioned:
1. My Kite Connect application is an active paid Kite Connect app, not a Personal app.
2. I generated a fresh access token using the same API key.
3. REST authentication works successfully:
profile() → successful
ltp(["NSE:SBIN"]) → successful
NSE instruments API → successful
4. The installed Python KiteConnect SDK shows: KiteTicker(api_key, access_token, ...)
5. The WebSocket endpoint is: wss://ws.kite.trade
6. I tested WebSocket separately with a minimal Python script, without my trading strategy, using reconnect=False.
The result is consistently:
WebSocket connection upgrade failed (403 - Forbidden)
followed by WebSocket error 1006.
The VPS public IP is also whitelisted in the Kite Connect Developer Console.
Since REST APIs work with the same fresh access token but the minimal KiteTicker WebSocket still receives HTTP 403, could you please check whether there is any server-side WebSocket permission/restriction on my Kite Connect application or account?
I have not included my API key, API secret, or access token for security reasons.
Thank you.
Then tap “Post Comment”.