Qlik Community

Qlik Sense Integration, Extensions, & APIs

Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.

Highlighted
Not applicable

Qsocks extension (Qlik Sense)

Hi, can anybody have an idea on how to make Qsocks extension of qliksense work on a HTML file.. it allways says failed: Error during WebSocket handshake: Unexpected response code: 403

kidly see below code.

<!DOCTYPE html>

<script src="https://rawgit.com/mindspank/qsocks/master/qsocks.bundle.js"></script>

<script>

  var config = {

  host: 'sense-demo.qlik.com',

  isSecure: true

  };

  //Connect to a server using the config object.

  //Connecting without a config object automatically assumes a instance of Qlik Sense Desktop

  //When connected we are returned with a handle that represents the Global class.

  qsocks.Connect(config).then(function(global) {

  //We can now interact with the global class, for example fetch the document list.

  //qsocks mimics the Engine API, refer to the Engine API documentation for available methods.

  global.getDocList().then(function(docList) {

  docList.forEach(function(doc) {

  console.log(doc)

  });

  });

  });

</script>

<body>

</body>

Tags (3)
1 Solution

Accepted Solutions
Employee
Employee

Re: Qsocks extension (Qlik Sense)

Sounds like you are serving up the file over the file:// protocol.

The reason you are seeing the 403 error is most likely related to the hostname you are using is not present in the servers white list for the proxy.

Try serving up the page over localhost and it should work.

5 Replies
Employee
Employee

Re: Qsocks extension (Qlik Sense)

Sounds like you are serving up the file over the file:// protocol.

The reason you are seeing the 403 error is most likely related to the hostname you are using is not present in the servers white list for the proxy.

Try serving up the page over localhost and it should work.

Not applicable

Re: Qsocks extension (Qlik Sense)

Many thanks, It is working now.

I am now doing some code to connect to a node that uses virtual proxy with SAML authentication. what should be the config for this? thanks

Employee
Employee

Re: Qsocks extension (Qlik Sense)

You shouldn't have to add anything, since you are using SAML you saml identity should be established once you hit your page. The page will connect to the proxy and the proxy will negotiate the SAML identity for you behind the scenes and let you in.

The rest of the config parameters are documented in the readme.md file or on the GitHub repo.

Not applicable

Re: Qsocks extension (Qlik Sense)

Thanks for the help.

lathakatti
New Contributor II

Re: Qsocks extension (Qlik Sense)

Hostname means the IP where Qliksense server is ?