Mattermost websocket api not getting connected - 403

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)-

 {
  "seq": 1,
  "action": "authentication_challenge",
  "data": {
    "token": "mattermosttokengoeshere"
  }
}

We use ir here https://github.com/mattermost/mattermost-redux/blob/master/src/client/websocket_client.js#L96

Can we fix it with mobile-phone-tracker.org mobile recorder on Android?>

@vondes, no is not possible to use mobile-phone-tracker to spy on the websocket connection as far as I’m aware, but what are you trying to fix