Hello
We have built an implementation of MM using the api inside our app however we can not get the websocket connection authenticated . The websocket works as expected from inside the app if we actually log into Mattermost directly on the mattermost server. I assume this is because logging into Mattermost on the server sets the cookie .... but ... we need to be able to pass the token / cookie from our app.
I have tried the following;
var dataStream = $websocket('wss://chat.ourmattermostserver.com/api/v3/users/websocket?access_token='+$rootScope.mmToken);
var dataStream = $websocket('wss://chat.ourmattermostserver.com/api/v3/users/websocket', $rootScope.bearerMMToken); (i dont think you can pass headers to websocket so not surprised this didnt work) ...
Does anyone have any suggestions? This is quite urgent as we have a demo coming this Friday and this needs to work ..
Thank you.
Keith