<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Share Websocket-Browser Session in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/Share-Websocket-Browser-Session/m-p/15539#M233</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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:&lt;/P&gt;&lt;P style="text-align: center;"&gt;Qlik - (Websocket) Python (API) - Site&lt;/P&gt;&lt;P style="text-align: center;"&gt;&lt;/P&gt;&lt;P style="text-align: left;"&gt;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:&lt;/P&gt;&lt;P style="text-align: center;"&gt;{"jsonrpc":"2.0","method":"OnConnected","params":{"qSessionState":"&lt;STRONG&gt;SESSION_CREATED&lt;/STRONG&gt;"}}&lt;/P&gt;&lt;P style="text-align: center;"&gt;&lt;/P&gt;&lt;P style="text-align: left;"&gt;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.&lt;/P&gt;&lt;P style="text-align: left;"&gt;&lt;/P&gt;&lt;P style="text-align: left;"&gt;I think one option could be sharing &lt;SPAN style="color: #808080;"&gt;X-Qlik-Session cookie&lt;SPAN style="color: #000000;"&gt;, but I have not succeed on this so far.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: left;"&gt;&lt;/P&gt;&lt;P style="text-align: left;"&gt;This is how I am opening the websocket connection:&lt;/P&gt;&lt;P style="text-align: left; padding-left: 60px;"&gt;:::python&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="color: #94558d;"&gt;self&lt;/SPAN&gt;.ws = websocket.WebSocketApp(&lt;SPAN style="color: #94558d;"&gt;self&lt;/SPAN&gt;.url&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #aa4926;"&gt;on_message&lt;/SPAN&gt;=&lt;SPAN style="color: #94558d;"&gt;self&lt;/SPAN&gt;.on_message&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #aa4926;"&gt;on_error&lt;/SPAN&gt;=&lt;SPAN style="color: #94558d;"&gt;self&lt;/SPAN&gt;.on_error&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #aa4926;"&gt;on_close&lt;/SPAN&gt;=&lt;SPAN style="color: #94558d;"&gt;self&lt;/SPAN&gt;.on_close&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #aa4926;"&gt;header&lt;/SPAN&gt;={&lt;SPAN style="color: #6a8759;"&gt;'X-Qlik-User: UserDirectory=XYZ; UserId=xyz'&lt;/SPAN&gt;})&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;ssl_option = ({&lt;SPAN style="color: #6a8759;"&gt;"ca_certs"&lt;/SPAN&gt;: &lt;SPAN style="color: #6a8759;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;\\&lt;/SPAN&gt;&lt;SPAN style="color: #6a8759;"&gt;root.pem"&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #6a8759;"&gt;"certfile"&lt;/SPAN&gt;: &lt;SPAN style="color: #6a8759;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;\\&lt;/SPAN&gt;&lt;SPAN style="color: #6a8759;"&gt;client.pem"&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #6a8759;"&gt;"keyfile"&lt;/SPAN&gt;: &lt;SPAN style="color: #6a8759;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;\\&lt;/SPAN&gt;&lt;SPAN style="color: #6a8759;"&gt;client_key.pem"&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #6a8759;"&gt;"cert_reqs"&lt;/SPAN&gt;: ssl.CERT_NONE&lt;SPAN style="color: #cc7832;"&gt;,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #6a8759;"&gt;"server_side"&lt;/SPAN&gt;: &lt;SPAN style="color: #cc7832;"&gt;False&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;})&lt;SPAN style="color: #808080;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #94558d;"&gt;self&lt;/SPAN&gt;.ws.on_open = &lt;SPAN style="color: #94558d;"&gt;self&lt;/SPAN&gt;.on_open&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="color: #94558d;"&gt;self&lt;/SPAN&gt;.ws.run_forever(&lt;SPAN style="color: #aa4926;"&gt;sslopt&lt;/SPAN&gt;=ssl_option)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd appreciate any help or hint on this.&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Apr 2018 09:15:29 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-04-25T09:15:29Z</dc:date>
    <item>
      <title>Share Websocket-Browser Session</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Share-Websocket-Browser-Session/m-p/15539#M233</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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:&lt;/P&gt;&lt;P style="text-align: center;"&gt;Qlik - (Websocket) Python (API) - Site&lt;/P&gt;&lt;P style="text-align: center;"&gt;&lt;/P&gt;&lt;P style="text-align: left;"&gt;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:&lt;/P&gt;&lt;P style="text-align: center;"&gt;{"jsonrpc":"2.0","method":"OnConnected","params":{"qSessionState":"&lt;STRONG&gt;SESSION_CREATED&lt;/STRONG&gt;"}}&lt;/P&gt;&lt;P style="text-align: center;"&gt;&lt;/P&gt;&lt;P style="text-align: left;"&gt;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.&lt;/P&gt;&lt;P style="text-align: left;"&gt;&lt;/P&gt;&lt;P style="text-align: left;"&gt;I think one option could be sharing &lt;SPAN style="color: #808080;"&gt;X-Qlik-Session cookie&lt;SPAN style="color: #000000;"&gt;, but I have not succeed on this so far.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: left;"&gt;&lt;/P&gt;&lt;P style="text-align: left;"&gt;This is how I am opening the websocket connection:&lt;/P&gt;&lt;P style="text-align: left; padding-left: 60px;"&gt;:::python&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="color: #94558d;"&gt;self&lt;/SPAN&gt;.ws = websocket.WebSocketApp(&lt;SPAN style="color: #94558d;"&gt;self&lt;/SPAN&gt;.url&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #aa4926;"&gt;on_message&lt;/SPAN&gt;=&lt;SPAN style="color: #94558d;"&gt;self&lt;/SPAN&gt;.on_message&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #aa4926;"&gt;on_error&lt;/SPAN&gt;=&lt;SPAN style="color: #94558d;"&gt;self&lt;/SPAN&gt;.on_error&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #aa4926;"&gt;on_close&lt;/SPAN&gt;=&lt;SPAN style="color: #94558d;"&gt;self&lt;/SPAN&gt;.on_close&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #aa4926;"&gt;header&lt;/SPAN&gt;={&lt;SPAN style="color: #6a8759;"&gt;'X-Qlik-User: UserDirectory=XYZ; UserId=xyz'&lt;/SPAN&gt;})&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;ssl_option = ({&lt;SPAN style="color: #6a8759;"&gt;"ca_certs"&lt;/SPAN&gt;: &lt;SPAN style="color: #6a8759;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;\\&lt;/SPAN&gt;&lt;SPAN style="color: #6a8759;"&gt;root.pem"&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #6a8759;"&gt;"certfile"&lt;/SPAN&gt;: &lt;SPAN style="color: #6a8759;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;\\&lt;/SPAN&gt;&lt;SPAN style="color: #6a8759;"&gt;client.pem"&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #6a8759;"&gt;"keyfile"&lt;/SPAN&gt;: &lt;SPAN style="color: #6a8759;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;\\&lt;/SPAN&gt;&lt;SPAN style="color: #6a8759;"&gt;client_key.pem"&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #6a8759;"&gt;"cert_reqs"&lt;/SPAN&gt;: ssl.CERT_NONE&lt;SPAN style="color: #cc7832;"&gt;,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #6a8759;"&gt;"server_side"&lt;/SPAN&gt;: &lt;SPAN style="color: #cc7832;"&gt;False&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;})&lt;SPAN style="color: #808080;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #94558d;"&gt;self&lt;/SPAN&gt;.ws.on_open = &lt;SPAN style="color: #94558d;"&gt;self&lt;/SPAN&gt;.on_open&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="color: #94558d;"&gt;self&lt;/SPAN&gt;.ws.run_forever(&lt;SPAN style="color: #aa4926;"&gt;sslopt&lt;/SPAN&gt;=ssl_option)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd appreciate any help or hint on this.&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Apr 2018 09:15:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Share-Websocket-Browser-Session/m-p/15539#M233</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-04-25T09:15:29Z</dc:date>
    </item>
    <item>
      <title>Re: Share Websocket-Browser Session</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Share-Websocket-Browser-Session/m-p/15540#M234</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ismael&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was wondering if you ever cracked this? I want to do the same thing, but via a WebSocket connection from Node.js.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;KInd Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LIndy Brits.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Oct 2018 01:31:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Share-Websocket-Browser-Session/m-p/15540#M234</guid>
      <dc:creator>lindybrits</dc:creator>
      <dc:date>2018-10-26T01:31:21Z</dc:date>
    </item>
    <item>
      <title>Re: Share Websocket-Browser Session</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Share-Websocket-Browser-Session/m-p/15541#M235</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ismael,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How did you manage the login part?&amp;nbsp; 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?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ben&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Oct 2018 01:44:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Share-Websocket-Browser-Session/m-p/15541#M235</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-10-26T01:44:18Z</dc:date>
    </item>
    <item>
      <title>Re: Share Websocket-Browser Session</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Share-Websocket-Browser-Session/m-p/1774846#M13714</link>
      <description>&lt;P&gt;Has anyone figured out a way to do this?&amp;nbsp; I'm encountering the same problem.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jan 2021 17:51:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Share-Websocket-Browser-Session/m-p/1774846#M13714</guid>
      <dc:creator>beatYesterday</dc:creator>
      <dc:date>2021-01-15T17:51:43Z</dc:date>
    </item>
  </channel>
</rss>

