Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
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>

1 Solution

Accepted Solutions
Alexander_Thor
Employee
Employee

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.

View solution in original post

5 Replies
Alexander_Thor
Employee
Employee

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
Author

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

Alexander_Thor
Employee
Employee

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
Author

Thanks for the help.

Anonymous
Not applicable
Author

Hostname means the IP where Qliksense server is ?