<?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 Re: Qlik Engine JSON API - Websocket disconnects in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Engine-JSON-API-Websocket-disconnects/m-p/1799603#M14757</link>
    <description>&lt;P&gt;Hi &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/41242"&gt;@Øystein_Kolsrud&lt;/a&gt; , Thank you for your solution. I tried using below syntax with my normal browser login details but doesn't seem to work. May be I have to use an API key? I will try to figure this out. Please let me know if I am going in the wrong way. An example would be very helpful. Thank you &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;--auth &amp;lt;username:password&amp;gt;&lt;/P&gt;</description>
    <pubDate>Thu, 15 Apr 2021 01:42:21 GMT</pubDate>
    <dc:creator>Mr_Pearl</dc:creator>
    <dc:date>2021-04-15T01:42:21Z</dc:date>
    <item>
      <title>Qlik Engine JSON API - Websocket disconnects</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Engine-JSON-API-Websocket-disconnects/m-p/1798947#M14739</link>
      <description>&lt;P&gt;QIX API looks like very useful tool. However, I am not able to keep the connection open. Below is the code I attempted in another server different to Qlik Sense server.&lt;/P&gt;&lt;P&gt;Command Prompt:&lt;BR /&gt;&lt;STRONG&gt;wscat -c ws://qliksense/app/&amp;lt;app id&amp;gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;Connected (press CTRL+C to quit)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&amp;lt; {"jsonrpc":"2.0","method":"OnAuthenticationInformation","params":{"loginUri":"&lt;A href="http://qliksense:80/internal_forms_authentication/?targetId=d1ea041a-1f26-454d-82a7-05021899b818" target="_blank"&gt;http://qliksense:80/internal_forms_authentication/?targetId=d1ea041a-1f26-454d-82a7-05021899b818&lt;/A&gt;","mustAuthenticate":true}}&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;Disconnected (code: 1001, reason: "")&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;As you can see above immediately after "connected", it gets "Disconnected" without me entering any details.&lt;/P&gt;&lt;P&gt;Don't know what is the problem. Am I missing some headers or authentication? Is there an example that I could refer too?. Any guidance will be helpful. Thank you&lt;/P&gt;</description>
      <pubDate>Fri, 13 Aug 2021 18:44:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Engine-JSON-API-Websocket-disconnects/m-p/1798947#M14739</guid>
      <dc:creator>Mr_Pearl</dc:creator>
      <dc:date>2021-08-13T18:44:03Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Engine JSON API - Websocket disconnects</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Engine-JSON-API-Websocket-disconnects/m-p/1798962#M14740</link>
      <description>&lt;P&gt;You're not authenticated ("mustAuthenticate": true). That's why you get disconnected. You need to authenticate according to the authentication method of the virtual proxy you are connecting to.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Apr 2021 06:12:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Engine-JSON-API-Websocket-disconnects/m-p/1798962#M14740</guid>
      <dc:creator>Øystein_Kolsrud</dc:creator>
      <dc:date>2021-04-13T06:12:21Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Engine JSON API - Websocket disconnects</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Engine-JSON-API-Websocket-disconnects/m-p/1799603#M14757</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/41242"&gt;@Øystein_Kolsrud&lt;/a&gt; , Thank you for your solution. I tried using below syntax with my normal browser login details but doesn't seem to work. May be I have to use an API key? I will try to figure this out. Please let me know if I am going in the wrong way. An example would be very helpful. Thank you &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;--auth &amp;lt;username:password&amp;gt;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Apr 2021 01:42:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Engine-JSON-API-Websocket-disconnects/m-p/1799603#M14757</guid>
      <dc:creator>Mr_Pearl</dc:creator>
      <dc:date>2021-04-15T01:42:21Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Engine JSON API - Websocket disconnects</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Engine-JSON-API-Websocket-disconnects/m-p/1799631#M14758</link>
      <description>&lt;P&gt;I'm not familiar with wscat, so can't give much help on that part, but in general (as you are already exploring) the authentication flow requires you to set the correct headers. Which headers to set depend totally on the authentication method used by the virtual proxy you are connecting to, so in order to help you further you'll need to provide information about the nature of that virtual proxy. And it's also important to know if you are trying to connect to the SaaS or the Windows edition.&lt;/P&gt;&lt;P&gt;Getting that authentication right can be quite complicated, but there are a number of libraries available that makes it easier for you. And especially if you want to authenticate using Windows credentials, then it is highly recommended that you perform your websocket interaction through either JavaScript or .NET. For .NET you can find examples on how to do different types of authentication here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/AptkQlik/PublicExamples" target="_blank"&gt;https://github.com/AptkQlik/PublicExamples&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Apr 2021 06:28:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Engine-JSON-API-Websocket-disconnects/m-p/1799631#M14758</guid>
      <dc:creator>Øystein_Kolsrud</dc:creator>
      <dc:date>2021-04-15T06:28:06Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Engine JSON API - Websocket disconnects</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Engine-JSON-API-Websocket-disconnects/m-p/1799722#M14760</link>
      <description>&lt;P&gt;You could also try qlik-cli for connecting to your server:&amp;nbsp;&lt;A href="https://qlik.dev/libraries-and-tools/qlik-cli" target="_blank"&gt;https://qlik.dev/libraries-and-tools/qlik-cli&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Apr 2021 11:52:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Engine-JSON-API-Websocket-disconnects/m-p/1799722#M14760</guid>
      <dc:creator>han</dc:creator>
      <dc:date>2021-04-15T11:52:23Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Engine JSON API - Websocket disconnects</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Engine-JSON-API-Websocket-disconnects/m-p/1799804#M14761</link>
      <description>&lt;P&gt;If you are using &lt;STRONG&gt;ws://qliksense/app/&amp;lt;app id&amp;gt;&lt;/STRONG&gt;, you might be using the default virtual proxy, with default authentication.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;How do you log in when you contact: &lt;STRONG&gt;http://qliksense/hub/&lt;/STRONG&gt;? If you get straight in, you might have single-sign-on using NTLM.&amp;nbsp;&lt;/P&gt;&lt;P&gt;What headers are set for the websocket request from your browser's Network, under DevTools (F12)?&lt;/P&gt;&lt;P&gt;If you set the session cookie, you might be alright.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Apr 2021 16:12:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Engine-JSON-API-Websocket-disconnects/m-p/1799804#M14761</guid>
      <dc:creator>vegard_bakke</dc:creator>
      <dc:date>2021-04-15T16:12:59Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Engine JSON API - Websocket disconnects</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Engine-JSON-API-Websocket-disconnects/m-p/1801140#M14782</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/25748"&gt;@vegard_bakke&lt;/a&gt;thnak you for your reply. When I login using browser, I had to enter my windows authentication details. And below are the ws get request detail&lt;/P&gt;&lt;P&gt;GET ws://domain/hub/qrsData?reloadUri=htt..&lt;/P&gt;&lt;P&gt;Request Headers:&lt;/P&gt;&lt;P&gt;Cookie: X-Qlik-Session-HTTP=xxxxx-xxx-xxx...&lt;/P&gt;&lt;P&gt;Sec-WebSocket-Key: xyz...&lt;/P&gt;&lt;P&gt;Upgrade: websocket&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Apr 2021 05:35:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Engine-JSON-API-Websocket-disconnects/m-p/1801140#M14782</guid>
      <dc:creator>Mr_Pearl</dc:creator>
      <dc:date>2021-04-21T05:35:42Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Engine JSON API - Websocket disconnects</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Engine-JSON-API-Websocket-disconnects/m-p/1801174#M14785</link>
      <description>&lt;P&gt;Is this the wscat you are referring to:&amp;nbsp;&lt;A href="https://github.com/websockets/wscat?" target="_blank"&gt;https://github.com/websockets/wscat?&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Half the answer may be to use wscat's --header "Cookie:&lt;SPAN&gt;X-Qlik-Session-HTTP=xxxxx-xxx-xxx...".&lt;BR /&gt;The missing half, is how to get the session cookie.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Try it manually first, using the session cookie you see in either each request, or under DevTools - Applications - Cookies - &amp;lt;Your host name&amp;gt;.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I don't know wscat. But from the look of things, it only supports basic authentication ('--auth').&amp;nbsp; But I don't think Qlik supports Basic authentication, at least not on the webscoket call.&amp;nbsp; (Correct me if I'm wrong, anyone.)&lt;BR /&gt;&lt;BR /&gt;So in that case, you need to do another normal GET request first, to obtain a session, and a session cookie.&amp;nbsp; &amp;nbsp;(For example https://&amp;lt;server&amp;gt;/&amp;lt;v.proxy&amp;gt;/api/about/v1/systemInfo, which will redirect you to a login module.)&amp;nbsp; But it is likely that it will need human interaction to log in.&lt;BR /&gt;&lt;BR /&gt;If that is not good enough, you might have to go down the certificates path.&amp;nbsp; If so, I would recommend running this from the same server as Qlik is running on.&lt;BR /&gt;&lt;BR /&gt;Vegard &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Apr 2021 07:44:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Engine-JSON-API-Websocket-disconnects/m-p/1801174#M14785</guid>
      <dc:creator>vegard_bakke</dc:creator>
      <dc:date>2021-04-21T07:44:43Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Engine JSON API - Websocket disconnects</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Engine-JSON-API-Websocket-disconnects/m-p/1801984#M14809</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/25748"&gt;@vegard_bakke&lt;/a&gt;&amp;nbsp; As you said I used the session cookie from the browser and it worked straightway Thank you so much for your helpful. And yes I was referring (wscat) to the link that you mentioned in your response.&lt;/P&gt;&lt;P&gt;For anyone looking to give it a try here is the syntax that worked for me,&lt;/P&gt;&lt;P&gt;wscat -c ws://&amp;lt;Qlik server&amp;gt;/app/&amp;lt;app id&amp;gt; --header "Cookie:X-Qlik-Session-HTTP=&amp;lt;copy paste from web browser - dev tools -- ws - request headers&amp;gt;"&lt;/P&gt;</description>
      <pubDate>Fri, 23 Apr 2021 05:39:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Engine-JSON-API-Websocket-disconnects/m-p/1801984#M14809</guid>
      <dc:creator>Mr_Pearl</dc:creator>
      <dc:date>2021-04-23T05:39:48Z</dc:date>
    </item>
  </channel>
</rss>

