Skip to main content

Integration, Extension & APIs

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

Skip the ticket, Chat with Qlik Support instead for instant assistance.
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Share Websocket-Browser Session


Due to business requirements I need to connect a website to QlikSense Enterprise so users can select values either directly on Qlik or from that site. So far, I have connected QlikSense Enterprise to that website via Python and Websocket. So something similar to this:

Qlik - (Websocket) Python (API) - Site

My problem is that when python connects to Qlik via Websocket I get a new session even though the user has already an open session (Qlik opened on browser). Message from Qlik:


This means that every modification the user makes via websocket will not be visible on the browser (different sessions). I have tried and read everything I could but I haven't found the way to create/share only one session per user, so all changes the user makes via the browser or websocket would be available to him.

I think one option could be sharing X-Qlik-Session cookie, but I have not succeed on this so far.

This is how I am opening the websocket connection:

:::python = websocket.WebSocketApp(self.url, on_message=self.on_message, on_error=self.on_error, on_close=self.on_close, header={'X-Qlik-User: UserDirectory=XYZ; UserId=xyz'})

ssl_option = ({"ca_certs": "\\root.pem",
   "certfile": "\\client.pem",
   "keyfile": "\\client_key.pem",
   "cert_reqs": ssl.CERT_NONE,
   "server_side": False
   }) = self.on_open

I'd appreciate any help or hint on this.

Thanks in advance!

3 Replies
Contributor III
Contributor III

Hi Ismael

I was wondering if you ever cracked this? I want to do the same thing, but via a WebSocket connection from Node.js.

KInd Regards,

LIndy Brits.

Not applicable

Hi Ismael,

How did you manage the login part?  Does your site has its own login page or you login in Qlik url in another tab that's why you're able to get the session?



Contributor III
Contributor III

Has anyone figured out a way to do this?  I'm encountering the same problem.