<?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: Calling openApp on a non authorized user in mashup in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/Calling-openApp-on-a-non-authorized-user-in-mashup/m-p/2422317#M19975</link>
    <description>&lt;P&gt;Hi &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/260821"&gt;@AKN&lt;/a&gt;&lt;/SPAN&gt; , you should be able to manage errors using "on" method and looking for errors. When a user cannot open an app your on error function should be triggered and then you can manage them. Please see &lt;A href="https://help.qlik.com/en-US/sense-developer/November2023/Subsystems/APIs/Content/Sense_ClientAPIs/CapabilityAPIs/RootAPI/on-method.htm" target="_blank"&gt;this &lt;/A&gt;example.&lt;/P&gt;</description>
    <pubDate>Thu, 22 Feb 2024 13:36:39 GMT</pubDate>
    <dc:creator>alex_colombo</dc:creator>
    <dc:date>2024-02-22T13:36:39Z</dc:date>
    <item>
      <title>Calling openApp on a non authorized user in mashup</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Calling-openApp-on-a-non-authorized-user-in-mashup/m-p/2422200#M19972</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I have an array of app ids. However if current user is not authorized on the app it gives "Forbidden" error. I don't want to try to open the app if it gives error and continue with next app id.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;for (let i = 0; i &amp;lt; appIds.length; i++) {
    getSheet(appIds[i]);
}

function getSheet(_appId) {
    qlik.openApp(_appId, config);
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've tried the last answer of this thread but still error pops up and for loop breaks:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.qlik.com/t5/Integration-Extension-APIs/Forbidden-app-for-the-current-user-Qlik-Sense-Mashup/m-p/1461729" target="_blank"&gt;https://community.qlik.com/t5/Integration-Extension-APIs/Forbidden-app-for-the-current-user-Qlik-Sense-Mashup/m-p/146172&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2024 10:53:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Calling-openApp-on-a-non-authorized-user-in-mashup/m-p/2422200#M19972</guid>
      <dc:creator>AKN</dc:creator>
      <dc:date>2024-02-22T10:53:39Z</dc:date>
    </item>
    <item>
      <title>Re: Calling openApp on a non authorized user in mashup</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Calling-openApp-on-a-non-authorized-user-in-mashup/m-p/2422317#M19975</link>
      <description>&lt;P&gt;Hi &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/260821"&gt;@AKN&lt;/a&gt;&lt;/SPAN&gt; , you should be able to manage errors using "on" method and looking for errors. When a user cannot open an app your on error function should be triggered and then you can manage them. Please see &lt;A href="https://help.qlik.com/en-US/sense-developer/November2023/Subsystems/APIs/Content/Sense_ClientAPIs/CapabilityAPIs/RootAPI/on-method.htm" target="_blank"&gt;this &lt;/A&gt;example.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2024 13:36:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Calling-openApp-on-a-non-authorized-user-in-mashup/m-p/2422317#M19975</guid>
      <dc:creator>alex_colombo</dc:creator>
      <dc:date>2024-02-22T13:36:39Z</dc:date>
    </item>
    <item>
      <title>Re: Calling openApp on a non authorized user in mashup</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Calling-openApp-on-a-non-authorized-user-in-mashup/m-p/2422574#M19985</link>
      <description>&lt;P&gt;Thank you, this works!&lt;/P&gt;
&lt;P&gt;However whenever console.log("error", _appId) runs &lt;STRIKE&gt;it logs all previous app ids that gave an error too&lt;/STRIKE&gt; it logs all previous app ids even if they didn't give any error. Do you think that's because how on method works or my code is broken somehow?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;openApp.on("error", function (error) {
  console.log("error", _appId);
});&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example&lt;/P&gt;
&lt;P&gt;if appid = "1" gave an error it logs&lt;/P&gt;
&lt;P&gt;"error 1"&lt;/P&gt;
&lt;P&gt;and after that appid = "2" gives an error then it logs&lt;/P&gt;
&lt;P&gt;"error 1"&lt;/P&gt;
&lt;P&gt;"error 2"&lt;/P&gt;
&lt;P&gt;appid = "3" doesn't give any error.&lt;/P&gt;
&lt;P&gt;appid = "4" gives an error and then:&lt;/P&gt;
&lt;P&gt;"error 1"&lt;/P&gt;
&lt;P&gt;"error 2"&lt;/P&gt;
&lt;P&gt;"error 3"&lt;/P&gt;
&lt;P&gt;"error 4"&lt;/P&gt;
&lt;P&gt;and so on.&lt;/P&gt;
&lt;DIV id="simple-translate" class="simple-translate-system-theme"&gt;
&lt;DIV&gt;
&lt;DIV class="simple-translate-button isShow" style="background-image: url('moz-extension://81de54a4-6c40-4696-a490-0f3227b0067e/icons/512.png'); height: 22px; width: 22px; top: 90px; left: 581px;"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="simple-translate-panel " style="width: 300px; height: 200px; top: 0px; left: 0px; font-size: 13px;"&gt;
&lt;DIV class="simple-translate-result-wrapper" style="overflow: hidden;"&gt;
&lt;DIV class="simple-translate-move" draggable="true"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="simple-translate-result-contents"&gt;
&lt;P class="simple-translate-result"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="simple-translate-candidate"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 22 Feb 2024 20:41:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Calling-openApp-on-a-non-authorized-user-in-mashup/m-p/2422574#M19985</guid>
      <dc:creator>AKN</dc:creator>
      <dc:date>2024-02-22T20:41:19Z</dc:date>
    </item>
    <item>
      <title>Re: Calling openApp on a non authorized user in mashup</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Calling-openApp-on-a-non-authorized-user-in-mashup/m-p/2422774#M19989</link>
      <description>&lt;P&gt;Your code is ok, this could be a bug. If you want you can open a support case for further investigation. Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 23 Feb 2024 08:46:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Calling-openApp-on-a-non-authorized-user-in-mashup/m-p/2422774#M19989</guid>
      <dc:creator>alex_colombo</dc:creator>
      <dc:date>2024-02-23T08:46:21Z</dc:date>
    </item>
  </channel>
</rss>

