"101 Switching Protocols. HTTP/1.1 403 Forbidden"

Deepan_R
I’m trying to connect to Zerodha Live Ticker WebSocket from a Spring Boot backend.
The connection is failing during the WebSocket handshake with the following error:

com.neovisionaries.ws.client.OpeningHandshakeException:
The status code of the opening handshake response is not '101 Switching Protocols'.
The status line is: HTTP/1.1 403 Forbidden

I’m using a valid access token generated from the login flow, and the same token works for REST APIs.
Only WebSocket is failing with a 403 Forbidden.
  • salim_chisty
    You may refer to the similar discussion here. Additionally, you may find it helpful to review the Java library example code for guidance.
  • Deepan_R
    @sujith I’m trying to connect to Zerodha Live Ticker WebSocket from a Spring Boot backend.
    The connection is failing during the WebSocket handshake with the following error:

    com.neovisionaries.ws.client.OpeningHandshakeException:
    The status code of the opening handshake response is not '101 Switching Protocols'.
    The status line is: HTTP/1.1 403 Forbidden

    I’m using a valid access token generated from the login flow, and the same token works for REST APIs.
    Only WebSocket is failing with a 403 Forbidden.
  • salim_chisty
    Please recheck the API key and access token for your Kite Connect app (paid version). Ensure that you are using the correct API key and access token, specifically from the paid version of the app.
Sign In or Register to comment.