<?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 Cloud login API not working in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Cloud-login-API-not-working/m-p/2125511#M19268</link>
    <description>&lt;P&gt;Looking at the logs for that trace ID it seems you are calling the jwt-session with an argument that it looks like is containing your JWT. Is that correct? I believe the JWT should be passed in the authorization header of the call.&lt;/P&gt;</description>
    <pubDate>Thu, 05 Oct 2023 10:43:51 GMT</pubDate>
    <dc:creator>Øystein_Kolsrud</dc:creator>
    <dc:date>2023-10-05T10:43:51Z</dc:date>
    <item>
      <title>Qlik Cloud login API not working</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Cloud-login-API-not-working/m-p/2125491#M19267</link>
      <description>&lt;P&gt;Hello fellow devs&lt;/P&gt;
&lt;P&gt;I'm trying to invoke the&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="bash"&gt;/login/jwt-session&lt;/LI-CODE&gt;
&lt;P&gt;API in Qlik Cloud to get an authentication cookie, like described here:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://qlik.dev/apis/rest/login#%23%2Fentries%2Flogin%2Fjwt-session-post" target="_blank"&gt;https://qlik.dev/apis/rest/login#%23%2Fentries%2Flogin%2Fjwt-session-post&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;However, I'm receiving the following error every time:&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;LI-CODE lang="java"&gt;{
    "errors": [
        {
            "title": "Invalid token request",
            "detail": "JWT_LOGIN_VALIDATIONS Missing required claim: jti",
            "code": "INTERNAL-TOKEN-1",
            "status": "400"
        }
    ],
    "traceId": "0000000000000000bbbff3e0123f1a09"
}&lt;/LI-CODE&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;The server is telling me that the "jti" claim is missing, however this is false. I've decoded the JWT token that I'm sending and, as you can see, all the required claims are there, including "jti":&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="master_t_0-1696500110617.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/117680i196F190C56F92D5B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="master_t_0-1696500110617.png" alt="master_t_0-1696500110617.png" /&gt;&lt;/span&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The jti claim is a GUID that I'm generating randomly every time.&lt;/P&gt;
&lt;P&gt;Can anyone tell me what I'm doing wrong here?&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 05 Oct 2023 10:04:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Cloud-login-API-not-working/m-p/2125491#M19267</guid>
      <dc:creator>master_t</dc:creator>
      <dc:date>2023-10-05T10:04:32Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Cloud login API not working</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Cloud-login-API-not-working/m-p/2125511#M19268</link>
      <description>&lt;P&gt;Looking at the logs for that trace ID it seems you are calling the jwt-session with an argument that it looks like is containing your JWT. Is that correct? I believe the JWT should be passed in the authorization header of the call.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2023 10:43:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Cloud-login-API-not-working/m-p/2125511#M19268</guid>
      <dc:creator>Øystein_Kolsrud</dc:creator>
      <dc:date>2023-10-05T10:43:51Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Cloud login API not working</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Cloud-login-API-not-working/m-p/2125512#M19269</link>
      <description>&lt;P&gt;I might be wrong but if I remember correctly Qlik Cloud expects the "jti" claim in the JWT header and not in the JWT payload.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2023 10:44:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Cloud-login-API-not-working/m-p/2125512#M19269</guid>
      <dc:creator>Damien_V</dc:creator>
      <dc:date>2023-10-05T10:44:29Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Cloud login API not working</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Cloud-login-API-not-working/m-p/2125520#M19270</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/29425"&gt;@Damien_V&lt;/a&gt;&amp;nbsp;: I've added jti to the header:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="master_t_0-1696503515219.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/117688i96C2A3F291CE0AF9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="master_t_0-1696503515219.png" alt="master_t_0-1696503515219.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But I get the same error&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/41242"&gt;@Øystein_Kolsrud&lt;/a&gt;&amp;nbsp;I'm passing the JWT token via the Authorization attribute, with the usual "Bearer XXX" syntax, where XXX is the token. I was doing some testing with different parameters so maybe that log is not indicative, would you be so kind to check this trace id:&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;000000000000000075caa0309fa9b57d&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;this I've just made, with no parameters in the URL, just the bearer token, with the jti value also added to the header.&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 05 Oct 2023 12:11:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Cloud-login-API-not-working/m-p/2125520#M19270</guid>
      <dc:creator>master_t</dc:creator>
      <dc:date>2023-10-05T12:11:32Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Cloud login API not working</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Cloud-login-API-not-working/m-p/2125654#M19273</link>
      <description>&lt;P&gt;I can confirm that I don't see the parameter for that trace ID. I can't really tell you what is wrong with your setup, but if you would like to test if your JWT is correct, then you could try out this example:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/kolsrud/qlik_rest_sdk/blob/master/Qlik.Sense.RestClient/Examples/QcsConnectJwt/Program.cs" target="_blank"&gt;https://github.com/kolsrud/qlik_rest_sdk/blob/master/Qlik.Sense.RestClient/Examples/QcsConnectJwt/Program.cs&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Just replace the jwt passed to the method AsJsonWebTokenViaQcs with the one you generate and see if you can connect. If you can't then you'll know there's something wrong with your JWT generation, but if you can connect with that one, then you'll know your problem is with how you pass the JWT to QCS.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2023 14:56:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Cloud-login-API-not-working/m-p/2125654#M19273</guid>
      <dc:creator>Øystein_Kolsrud</dc:creator>
      <dc:date>2023-10-05T14:56:30Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Cloud login API not working</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Cloud-login-API-not-working/m-p/2125831#M19277</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/16584"&gt;@master_t&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ok, I double-checked and you're right, jti is in the payload.&lt;/P&gt;
&lt;P&gt;I compared with my own JWT token and the only difference I see is the algorithm which is not the same.&lt;BR /&gt;You're using RS512 and I use RS256&lt;/P&gt;
&lt;P&gt;Can you try with RS256 and see if that works or not?&lt;/P&gt;</description>
      <pubDate>Fri, 06 Oct 2023 00:48:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Cloud-login-API-not-working/m-p/2125831#M19277</guid>
      <dc:creator>Damien_V</dc:creator>
      <dc:date>2023-10-06T00:48:35Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Cloud login API not working</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Cloud-login-API-not-working/m-p/2125938#M19278</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/29425"&gt;@Damien_V&lt;/a&gt;&amp;nbsp; I've switched to RS256, but same result. You can check it on trace ID&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;0000000000000000027705fba6143e20&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/41242"&gt;@Øystein_Kolsrud&lt;/a&gt;&amp;nbsp;the token works, I know because in the same application I am using it to access the QS Engine, like this:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;LI-CODE lang="csharp"&gt;var cloudLocation = QcsLocation.FromUri(uri);
cloudLocation.AsJwt(token);&lt;/LI-CODE&gt;
&lt;P&gt;and it doesn't give me any issues, it connects and I can get data from apps and all the rest.&lt;/P&gt;
&lt;P&gt;Here is the full request I'm sending, if it is any help:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Request Headers
	Content-Type: application/json
	Authorization: Bearer eyJhbGciOi...
	User-Agent: PostmanRuntime/7.33.0
	Accept: */*
	Postman-Token: e5238ab3-61bc-4724-978c-7610a34f2c6e
	Host: xxxxxxxx.eu.qlikcloud.com
	Accept-Encoding: gzip, deflate, br
	Connection: keep-alive
	Content-Length: 2
Request Body
	{}&lt;/LI-CODE&gt;&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Fri, 06 Oct 2023 08:22:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Cloud-login-API-not-working/m-p/2125938#M19278</guid>
      <dc:creator>master_t</dc:creator>
      <dc:date>2023-10-06T08:22:04Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Cloud login API not working</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Cloud-login-API-not-working/m-p/2125948#M19279</link>
      <description>&lt;P&gt;Ok, I found the issue: the variable I was using in Postman to pass the token was being overridden, so I wasn't sending the correct value. Sorry for wasting your time guys, and thanks for the support.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Oct 2023 08:40:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Cloud-login-API-not-working/m-p/2125948#M19279</guid>
      <dc:creator>master_t</dc:creator>
      <dc:date>2023-10-06T08:40:08Z</dc:date>
    </item>
  </channel>
</rss>

