<?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 .Net SDK - Multiple sessions using ApiKey connection? in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/Net-SDK-Multiple-sessions-using-ApiKey-connection/m-p/1844247#M15703</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a ASP.Net Core web app, I am connecting to Qlik SaaS via an APIKey. (location.AsApiKey())&lt;/P&gt;&lt;P&gt;This is causing me an issue because I need each user to be able to apply a specific selection (using app.GetField().Select()) to the Qlik app so that they only see data relevant to them.&lt;/P&gt;&lt;P&gt;Since an APIKey is tied to a specific/single Qlik user account this means that each user of my web app will be applying different selections to the same user session which won't work.&amp;nbsp;&lt;/P&gt;&lt;P&gt;What is the best way to connect to a Qlik Saas app to allow each user to have their own session?&lt;/P&gt;&lt;P&gt;Is there a way to pass user accounts/details to Qlik SaaS?&amp;nbsp; or create a new session for each request to the API?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Apologies if I have made mistakes in my explanation/understanding, I am a junior dev!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Josh&lt;/P&gt;</description>
    <pubDate>Fri, 08 Oct 2021 13:54:36 GMT</pubDate>
    <dc:creator>Josh_Rmg</dc:creator>
    <dc:date>2021-10-08T13:54:36Z</dc:date>
    <item>
      <title>.Net SDK - Multiple sessions using ApiKey connection?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Net-SDK-Multiple-sessions-using-ApiKey-connection/m-p/1844247#M15703</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a ASP.Net Core web app, I am connecting to Qlik SaaS via an APIKey. (location.AsApiKey())&lt;/P&gt;&lt;P&gt;This is causing me an issue because I need each user to be able to apply a specific selection (using app.GetField().Select()) to the Qlik app so that they only see data relevant to them.&lt;/P&gt;&lt;P&gt;Since an APIKey is tied to a specific/single Qlik user account this means that each user of my web app will be applying different selections to the same user session which won't work.&amp;nbsp;&lt;/P&gt;&lt;P&gt;What is the best way to connect to a Qlik Saas app to allow each user to have their own session?&lt;/P&gt;&lt;P&gt;Is there a way to pass user accounts/details to Qlik SaaS?&amp;nbsp; or create a new session for each request to the API?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Apologies if I have made mistakes in my explanation/understanding, I am a junior dev!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Josh&lt;/P&gt;</description>
      <pubDate>Fri, 08 Oct 2021 13:54:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Net-SDK-Multiple-sessions-using-ApiKey-connection/m-p/1844247#M15703</guid>
      <dc:creator>Josh_Rmg</dc:creator>
      <dc:date>2021-10-08T13:54:36Z</dc:date>
    </item>
    <item>
      <title>Re: .Net SDK - Multiple sessions using ApiKey connection?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Net-SDK-Multiple-sessions-using-ApiKey-connection/m-p/1844693#M15707</link>
      <description>&lt;P&gt;An API key is strictly tied to a specific user, so if you authenticate using such a key, then you will end up as accessing the system as that user only. But you can still make multiple connections to Qlik SaaS that have independent sessions (or selection states if you like). You achieve this by specifying a session token in the second argument to&amp;nbsp; method IQcsLocation.App:&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.qlik.com/en-US/sense-developer/August2021/Subsystems/NetSDKAPIref/Content/Qlik.Engine.IQcsLocation.App.htm#Qlik_Engine_IQcsLocation_App_System_String_Qlik_Engine_SessionToken_System_Boolean_" target="_blank" rel="noopener"&gt;https://help.qlik.com/en-US/sense-developer/August2021/Subsystems/NetSDKAPIref/Content/Qlik.Engine.IQcsLocation.App.htm#Qlik_Engine_IQcsLocation_App_System_String_Qlik_Engine_SessionToken_System_Boolean_&lt;/A&gt;&lt;/P&gt;&lt;P&gt;So instead of doing:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;var app = location.App(appId);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You do:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;var app = location.App(appId, SessionToken.Custom("mytoken"));&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Or possibly this to get a guaranteed unique session:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;var app = location.App(appId, SessionToken.Unique());&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jan 2022 09:07:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Net-SDK-Multiple-sessions-using-ApiKey-connection/m-p/1844693#M15707</guid>
      <dc:creator>Øystein_Kolsrud</dc:creator>
      <dc:date>2022-01-18T09:07:17Z</dc:date>
    </item>
    <item>
      <title>Re: .Net SDK - Multiple sessions using ApiKey connection?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Net-SDK-Multiple-sessions-using-ApiKey-connection/m-p/1845705#M15724</link>
      <description>&lt;P&gt;Perfect thanks&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/41242"&gt;@Øystein_Kolsrud&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Oct 2021 16:28:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Net-SDK-Multiple-sessions-using-ApiKey-connection/m-p/1845705#M15724</guid>
      <dc:creator>Josh_Rmg</dc:creator>
      <dc:date>2021-10-12T16:28:10Z</dc:date>
    </item>
  </channel>
</rss>

