Aelita-5879 avatar image
0 Votes"
Aelita-5879 asked markdon commented

WebSocket issue (Outlook add-in)

Hi! [I apologize in advance for being a newbie]
I'd like to develop an Outlook add-in, which passes the text of the message to a websocket server with the translation model and gets the translation. At first I got a problem with ws connection and I got the impression that Outlook doesn't allow to use an insecure protocol. With the wss connection I still experience the same problem: WebSocket connection to 'wss://' failed: (without the specification of the error). I guess there is some issue with the certificate, but I'm not sure how to fix it.

The code itself is very basic (this one is for testing):

 const websocket = new WebSocket("wss://");
 const data = {'text': 'Hello', 'source': 'eng', 'target': 'ukr', 'model': 'default'};
 websocket.onopen = function (event) {
 websocket.onmessage = function (event) {
                 resp = JSON.parse(;
                 $("#result-word")[0].innerText = resp['result'];
 websocket.onerror = function (event) {
 websocket.onclose = function (event) {

Would be very grateful for any advice.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I had the impression that HTTPS and valid certificates are requirements, but I can't easily find you the document that says that.

My solution for HTTPS locally involves buying certificates for a domain you own and modifying hosts so that domain points to on your machine.

There's also a tool from OfficeDev that looks pretty straight forward:

0 Votes 0 ·

0 Answers