<?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: How can i fetch a csrf token with an access token? in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/How-can-i-fetch-a-csrf-token-with-an-access-token/m-p/2102177#M18950</link>
    <description>&lt;DIV&gt;&lt;SPAN&gt;Hello Team,&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;Same error i am facing,&lt;BR /&gt;&lt;BR /&gt;Error :&amp;nbsp;CSRF&amp;nbsp;token&amp;nbsp;not&amp;nbsp;supported&amp;nbsp;for&amp;nbsp;given&amp;nbsp;authentication&amp;nbsp;type. 400 Bad request.&lt;BR /&gt;&lt;BR /&gt;I have Client Credentials access token in Qlik Saas Business Portal Where i can not configure Identity provider. how can we solve it,&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;/SPAN&gt;&lt;/DIV&gt;</description>
    <pubDate>Thu, 03 Aug 2023 15:17:37 GMT</pubDate>
    <dc:creator>ashish_banjare</dc:creator>
    <dc:date>2023-08-03T15:17:37Z</dc:date>
    <item>
      <title>How can i fetch a csrf token with an access token?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/How-can-i-fetch-a-csrf-token-with-an-access-token/m-p/1900614#M16379</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I have integrated an OAuth2 flow on my Qlik Sense Business tenant and I can successfully retrieve an access_token.&lt;/P&gt;
&lt;P&gt;But I can't make it work when sending this token in Authorization Bearer header to get a csrf token which I aim to use it in my websocket connection later.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;const response = await fetch(
    'https://mytenant.eu.qlikcloud.com/api/v1/csrf-token',
    {
      method: 'GET',
      credentials: 'include',
      headers: {
        Authorization: `Bearer ${accessToken}`,
      },
    },
  );&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It simply returns a 404 Not Found.&lt;/P&gt;
&lt;P&gt;But I can use this very same token to fetch current user in&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;A href="https://mytenant.eu.qlikcloud.com/api/v1/users" target="_self"&gt;https://mytenant.eu.qlikcloud.com/api/v1/users&lt;/A&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;and it successfully gives me my user info.&lt;/P&gt;
&lt;P&gt;What am I doing wrong? Or, is this&amp;nbsp; an unsupported feature?&lt;/P&gt;
&lt;P&gt;I also tried to include&amp;nbsp; qlik-web-integration-id in my request header but no success either.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Mar 2022 13:49:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/How-can-i-fetch-a-csrf-token-with-an-access-token/m-p/1900614#M16379</guid>
      <dc:creator>nicefella</dc:creator>
      <dc:date>2022-03-03T13:49:09Z</dc:date>
    </item>
    <item>
      <title>Re: How can i fetch a csrf token with an access token?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/How-can-i-fetch-a-csrf-token-with-an-access-token/m-p/1904090#M16416</link>
      <description>&lt;P&gt;The error is misleading but basically the csrf-token endpoint does not support that authentication type, it's only meant for authentication through an interactive Identity Provider.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Mar 2022 13:43:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/How-can-i-fetch-a-csrf-token-with-an-access-token/m-p/1904090#M16416</guid>
      <dc:creator>Damien_V</dc:creator>
      <dc:date>2022-03-11T13:43:00Z</dc:date>
    </item>
    <item>
      <title>Re: How can i fetch a csrf token with an access token?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/How-can-i-fetch-a-csrf-token-with-an-access-token/m-p/2102177#M18950</link>
      <description>&lt;DIV&gt;&lt;SPAN&gt;Hello Team,&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;Same error i am facing,&lt;BR /&gt;&lt;BR /&gt;Error :&amp;nbsp;CSRF&amp;nbsp;token&amp;nbsp;not&amp;nbsp;supported&amp;nbsp;for&amp;nbsp;given&amp;nbsp;authentication&amp;nbsp;type. 400 Bad request.&lt;BR /&gt;&lt;BR /&gt;I have Client Credentials access token in Qlik Saas Business Portal Where i can not configure Identity provider. how can we solve it,&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;/SPAN&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 03 Aug 2023 15:17:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/How-can-i-fetch-a-csrf-token-with-an-access-token/m-p/2102177#M18950</guid>
      <dc:creator>ashish_banjare</dc:creator>
      <dc:date>2023-08-03T15:17:37Z</dc:date>
    </item>
  </channel>
</rss>

