<?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 401 Unauthorized, Code &amp;quot;AUTH-1&amp;quot; when calling /login/jwt-session in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/401-Unauthorized-Code-quot-AUTH-1-quot-when-calling-login-jwt/m-p/2428695#M20160</link>
    <description>&lt;DIV class="p-rich_text_section"&gt;Hi everyone.&lt;/DIV&gt;
&lt;DIV class="p-rich_text_section"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="p-rich_text_section"&gt;I'm getting a 401 - Unauthorized response with code "AUTH-1" when calling the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE class="c-mrkdwn__code" data-stringify-type="code"&gt;/login/jwt-session&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;endpoint from a local session proxy built with express modeled after the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A class="c-link" href="https://qlik.dev/authenticate/jwt/jwt-proxy/quickstart-qlik-jwt-proxy/" target="_blank" rel="noopener noreferrer" data-stringify-link="https://qlik.dev/authenticate/jwt/jwt-proxy/quickstart-qlik-jwt-proxy/" data-sk="tooltip_parent"&gt;Implement a Qlik Cloud session cookie proxy&lt;/A&gt;&amp;nbsp;example:&lt;/DIV&gt;
&lt;DIV class="p-rich_text_section"&gt;&lt;LI-CODE lang="javascript"&gt;const resp = await fetch(`https://${tenantUri}/login/jwt-session`, {
            method: 'POST',
            headers: {
                Authorization: `Bearer ${token}`,
            },
        })&lt;/LI-CODE&gt;&lt;/DIV&gt;
&lt;DIV class="p-rich_text_section"&gt;That error is unexpected because:&lt;/DIV&gt;
&lt;OL class="p-rich_text_list p-rich_text_list__ordered" data-stringify-type="ordered-list" data-indent="0" data-border="0"&gt;
&lt;LI data-stringify-indent="0" data-stringify-border="0"&gt;The same setup was working earlier this week&lt;/LI&gt;
&lt;LI data-stringify-indent="0" data-stringify-border="0"&gt;I don't get the "details" field on the response, all I get is:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE class="c-mrkdwn__code" data-stringify-type="code"&gt;{"errors":[{"title":"Unauthorized","code":"AUTH-1","status":"401"}],"traceId":"bfd31bd2cb66b875ef9a975bb1ca91bc"}&lt;/CODE&gt;&lt;/LI&gt;
&lt;LI data-stringify-indent="0" data-stringify-border="0"&gt;If I copy the exact same token and use it on Postman, the call is successful&lt;/LI&gt;
&lt;/OL&gt;
&lt;DIV class="p-rich_text_section"&gt;I'm kinda stumped trying to fix this, since I can't find what "code":"AUTH-1" means anywhere and I also don't know what to do with that traceId. Anyone has any ideas to help with debugging?&lt;/DIV&gt;</description>
    <pubDate>Fri, 08 Mar 2024 11:44:11 GMT</pubDate>
    <dc:creator>pperdigo</dc:creator>
    <dc:date>2024-03-08T11:44:11Z</dc:date>
    <item>
      <title>401 Unauthorized, Code "AUTH-1" when calling /login/jwt-session</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/401-Unauthorized-Code-quot-AUTH-1-quot-when-calling-login-jwt/m-p/2428695#M20160</link>
      <description>&lt;DIV class="p-rich_text_section"&gt;Hi everyone.&lt;/DIV&gt;
&lt;DIV class="p-rich_text_section"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="p-rich_text_section"&gt;I'm getting a 401 - Unauthorized response with code "AUTH-1" when calling the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE class="c-mrkdwn__code" data-stringify-type="code"&gt;/login/jwt-session&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;endpoint from a local session proxy built with express modeled after the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A class="c-link" href="https://qlik.dev/authenticate/jwt/jwt-proxy/quickstart-qlik-jwt-proxy/" target="_blank" rel="noopener noreferrer" data-stringify-link="https://qlik.dev/authenticate/jwt/jwt-proxy/quickstart-qlik-jwt-proxy/" data-sk="tooltip_parent"&gt;Implement a Qlik Cloud session cookie proxy&lt;/A&gt;&amp;nbsp;example:&lt;/DIV&gt;
&lt;DIV class="p-rich_text_section"&gt;&lt;LI-CODE lang="javascript"&gt;const resp = await fetch(`https://${tenantUri}/login/jwt-session`, {
            method: 'POST',
            headers: {
                Authorization: `Bearer ${token}`,
            },
        })&lt;/LI-CODE&gt;&lt;/DIV&gt;
&lt;DIV class="p-rich_text_section"&gt;That error is unexpected because:&lt;/DIV&gt;
&lt;OL class="p-rich_text_list p-rich_text_list__ordered" data-stringify-type="ordered-list" data-indent="0" data-border="0"&gt;
&lt;LI data-stringify-indent="0" data-stringify-border="0"&gt;The same setup was working earlier this week&lt;/LI&gt;
&lt;LI data-stringify-indent="0" data-stringify-border="0"&gt;I don't get the "details" field on the response, all I get is:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE class="c-mrkdwn__code" data-stringify-type="code"&gt;{"errors":[{"title":"Unauthorized","code":"AUTH-1","status":"401"}],"traceId":"bfd31bd2cb66b875ef9a975bb1ca91bc"}&lt;/CODE&gt;&lt;/LI&gt;
&lt;LI data-stringify-indent="0" data-stringify-border="0"&gt;If I copy the exact same token and use it on Postman, the call is successful&lt;/LI&gt;
&lt;/OL&gt;
&lt;DIV class="p-rich_text_section"&gt;I'm kinda stumped trying to fix this, since I can't find what "code":"AUTH-1" means anywhere and I also don't know what to do with that traceId. Anyone has any ideas to help with debugging?&lt;/DIV&gt;</description>
      <pubDate>Fri, 08 Mar 2024 11:44:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/401-Unauthorized-Code-quot-AUTH-1-quot-when-calling-login-jwt/m-p/2428695#M20160</guid>
      <dc:creator>pperdigo</dc:creator>
      <dc:date>2024-03-08T11:44:11Z</dc:date>
    </item>
    <item>
      <title>Re: 401 Unauthorized, Code "AUTH-1" when calling /login/jwt-session</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/401-Unauthorized-Code-quot-AUTH-1-quot-when-calling-login-jwt/m-p/2431155#M20213</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/177413"&gt;@pperdigo&lt;/a&gt;&amp;nbsp;, compare request headers from your code and Postman, maybe you are missing something. If it works from Postman, should work from your code as well.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Mar 2024 08:30:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/401-Unauthorized-Code-quot-AUTH-1-quot-when-calling-login-jwt/m-p/2431155#M20213</guid>
      <dc:creator>alex_colombo</dc:creator>
      <dc:date>2024-03-15T08:30:07Z</dc:date>
    </item>
    <item>
      <title>Re: 401 Unauthorized, Code "AUTH-1" when calling /login/jwt-session</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/401-Unauthorized-Code-quot-AUTH-1-quot-when-calling-login-jwt/m-p/2441313#M20362</link>
      <description>&lt;P&gt;Hi Alex! Thanks for the reply&lt;/P&gt;
&lt;P&gt;If I remender correctly, the headers were matching. Another weird thing I noticed after making this post is that if I ran the code from another device, the error wouldn't happen.&lt;/P&gt;
&lt;P&gt;And as it turns out, a few days later, the code started working again on my main workstation and hasn't returned, so I just chalked it up to some browser weirdness.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Apr 2024 14:14:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/401-Unauthorized-Code-quot-AUTH-1-quot-when-calling-login-jwt/m-p/2441313#M20362</guid>
      <dc:creator>pperdigo</dc:creator>
      <dc:date>2024-04-15T14:14:03Z</dc:date>
    </item>
  </channel>
</rss>

