Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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>
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.
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.
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
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.
Thanks for the help.
Hostname means the IP where Qliksense server is ?