I am working on the java driver. From the documentation - we first need to connect and then authenticate but when I am trying to connect, I am getting 403 forbidden and the connection is getting closed. - https://github.com/bangarharshit/Mattermost-Java-Driver/blob/web-socket/src/main/java/websocket/WebsocketAPI.java
I can see in the browser the same websocket is working with correct cookies (it is failing with 403 when cookies are not set).
We use react native for our Android app, maybe you can take a look at their websocket implementation as it works just fine with our app
I don’t see you are ever using authentication_challenge (grepped authentication_challenge in your repo, are there any examples for the same)-
We use ir here https://github.com/mattermost/mattermost-redux/blob/master/src/client/websocket_client.js#L96