Handshake Error (Java)

ppllc
I am getting a handshake error when I connect to the Websocket server. what could be wrong?

HandShakeException: Response code was not 101: 400.

here is the code segment:
WebSocketContainer container = ContainerProvider.getWebSocketContainer();

container.connectToServer(this, new URI("wss://websocket.kite.trade?api_key=" + apiKey + "&user_id=" + authResp.getUser_id() + "&public_token=" + authResp.getPublic_token() ));
  • Kailash
    Kailash edited July 2016
    Try adding a slash at the end of the hostname: wss://websocket.kite.trade/?api_key... instead of wss://websocket.kite.trade?api_key....
Sign In or Register to comment.