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

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

Can we fix it with 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