Search code examples
websocketqliksense

Connect to socket Qlik Sense Entreprise with EnigmaJS


I build a working mashup on QlikSense Desktop connecting with the usual:

appId = 'engine';
this.session = enigma.create({
    schema,
    url: 'ws://localhost:4848/app/' + appId
})

But now I uploaded the mashup on the server, and for once, it behaves as expected. It doesn't. I tried to change it to the following as the server doesn't have SSL certificates.

'ws://domainname:4747/'+appId

But nothing works, any idea ?

(Basically my question is: How can I find my QIX Engine ws url ?)


Solution

  • Whats the error?

    But in general, when using QS server you have to be authenticated in order to get some data.

    You can check all the received data by listening to all traffic for more details on the error:

    session.on('traffic:received', data => console.log('received:', data));

    Or you can just "listen" to data related only to authentication by setting a dedicated notification:

    session.on('notification:OnAuthenticationInformation', (authInfo) => {
      console.log(authInfo)
    });
    

    Have a look at Connecting to the Qlik Engine JSON API (scroll down to Qlik Sense Enterprise section) to get the idea what types of authentication are supported