<?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 Dynamically set token in REST-connector queryHeaders (TopDesk) in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/Dynamically-set-token-in-REST-connector-queryHeaders-TopDesk/m-p/1862936#M15935</link>
    <description>&lt;P&gt;Dear all,&lt;/P&gt;
&lt;P&gt;Using Qlik Sense, I am trying to connect through REST to TopDesk.&lt;/P&gt;
&lt;P&gt;They use a token with a limited validity of only 8 hours.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I set up a REST connector, and am trying to automate the refreshing of the token. My LIB-connector looks like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;CUSTOM CONNECT TO "provider=QvRestConnector.exe;&lt;BR /&gt;url=&lt;A href="https://company.topdesk.net/tas/api/incidents?start%210;timeout=30;readwritetimeout=300;method=GET;httpProtocol=1.1" target="_blank"&gt;https://company.topdesk.net/tas/api/incidents?start%210;timeout=30;readwritetimeout=300;method=GET;httpProtocol=1.1&lt;/A&gt;;&lt;BR /&gt;isKeepAlive=true;&lt;BR /&gt;bodyEncoding=UTF-8;&lt;BR /&gt;sendExpect100Continue=true;&lt;BR /&gt;autoDetectResponseType=true;&lt;BR /&gt;checkResponseTypeOnTestConnection=true;&lt;BR /&gt;keyGenerationStrategy=0;&lt;BR /&gt;XMLDTD=0;&lt;BR /&gt;authSchema=anonymous;&lt;BR /&gt;serverCertificateValidation=UseTrust;&lt;BR /&gt;useCertificate=No;certificateStoreLocation=LocalMachine;&lt;BR /&gt;certificateStoreName=My;&lt;BR /&gt;addMissingQueryParametersToFinalRequest=false;&lt;BR /&gt;queryHeaders=Authorization%2TOKEN id%%2%%383dd4d97-02d7-4574-a807-911c97ffeda0%%3%1;&lt;BR /&gt;PaginationType=None;&lt;BR /&gt;allowResponseHeaders=false;&lt;BR /&gt;allowHttpsOnly=false;&lt;BR /&gt;isCookieContainerEnabled=false;&lt;BR /&gt;useProxy=false;proxyBypassOnLocal=false&lt;BR /&gt;;proxyUseDefaultCredentials=true;"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This worked yesterday, but the token has expired.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So now I am trying to override that token by using WITH CONNECTION in my query.&lt;/P&gt;
&lt;P&gt;RestConnectorMasterTable:&lt;BR /&gt;SQL SELECT &lt;BR /&gt;"id" AS "id_u16"&lt;/P&gt;
&lt;P&gt;...&lt;/P&gt;
&lt;P&gt;)&lt;BR /&gt;FROM JSON (wrap on) "root" PK "__KEY_root"&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;WITH CONNECTION(&lt;BR /&gt;QUERY "queryHeaders" "Authorization%2TOKEN id%%2%%30a0dd5ba-84ee-451c-a512-78bd87f7e054%%3%1"&lt;BR /&gt;);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, this doesn't seem to work; I still get the 401-error. What is it I am doing wrong?&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>Wed, 24 Nov 2021 08:53:09 GMT</pubDate>
    <dc:creator>Lemac</dc:creator>
    <dc:date>2021-11-24T08:53:09Z</dc:date>
    <item>
      <title>Dynamically set token in REST-connector queryHeaders (TopDesk)</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Dynamically-set-token-in-REST-connector-queryHeaders-TopDesk/m-p/1862936#M15935</link>
      <description>&lt;P&gt;Dear all,&lt;/P&gt;
&lt;P&gt;Using Qlik Sense, I am trying to connect through REST to TopDesk.&lt;/P&gt;
&lt;P&gt;They use a token with a limited validity of only 8 hours.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I set up a REST connector, and am trying to automate the refreshing of the token. My LIB-connector looks like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;CUSTOM CONNECT TO "provider=QvRestConnector.exe;&lt;BR /&gt;url=&lt;A href="https://company.topdesk.net/tas/api/incidents?start%210;timeout=30;readwritetimeout=300;method=GET;httpProtocol=1.1" target="_blank"&gt;https://company.topdesk.net/tas/api/incidents?start%210;timeout=30;readwritetimeout=300;method=GET;httpProtocol=1.1&lt;/A&gt;;&lt;BR /&gt;isKeepAlive=true;&lt;BR /&gt;bodyEncoding=UTF-8;&lt;BR /&gt;sendExpect100Continue=true;&lt;BR /&gt;autoDetectResponseType=true;&lt;BR /&gt;checkResponseTypeOnTestConnection=true;&lt;BR /&gt;keyGenerationStrategy=0;&lt;BR /&gt;XMLDTD=0;&lt;BR /&gt;authSchema=anonymous;&lt;BR /&gt;serverCertificateValidation=UseTrust;&lt;BR /&gt;useCertificate=No;certificateStoreLocation=LocalMachine;&lt;BR /&gt;certificateStoreName=My;&lt;BR /&gt;addMissingQueryParametersToFinalRequest=false;&lt;BR /&gt;queryHeaders=Authorization%2TOKEN id%%2%%383dd4d97-02d7-4574-a807-911c97ffeda0%%3%1;&lt;BR /&gt;PaginationType=None;&lt;BR /&gt;allowResponseHeaders=false;&lt;BR /&gt;allowHttpsOnly=false;&lt;BR /&gt;isCookieContainerEnabled=false;&lt;BR /&gt;useProxy=false;proxyBypassOnLocal=false&lt;BR /&gt;;proxyUseDefaultCredentials=true;"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This worked yesterday, but the token has expired.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So now I am trying to override that token by using WITH CONNECTION in my query.&lt;/P&gt;
&lt;P&gt;RestConnectorMasterTable:&lt;BR /&gt;SQL SELECT &lt;BR /&gt;"id" AS "id_u16"&lt;/P&gt;
&lt;P&gt;...&lt;/P&gt;
&lt;P&gt;)&lt;BR /&gt;FROM JSON (wrap on) "root" PK "__KEY_root"&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;WITH CONNECTION(&lt;BR /&gt;QUERY "queryHeaders" "Authorization%2TOKEN id%%2%%30a0dd5ba-84ee-451c-a512-78bd87f7e054%%3%1"&lt;BR /&gt;);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, this doesn't seem to work; I still get the 401-error. What is it I am doing wrong?&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>Wed, 24 Nov 2021 08:53:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Dynamically-set-token-in-REST-connector-queryHeaders-TopDesk/m-p/1862936#M15935</guid>
      <dc:creator>Lemac</dc:creator>
      <dc:date>2021-11-24T08:53:09Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically set token in REST-connector queryHeaders (TopDesk)</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Dynamically-set-token-in-REST-connector-queryHeaders-TopDesk/m-p/1864552#M15950</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/84481"&gt;@Lemac&lt;/a&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Have you seen this already ?&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;A href="https://community.qlik.com/t5/Qlik-Sense-Documents/Handling-Refresh-Tokens-with-the-Qlik-REST-Connector/ta-p/1492836" target="_blank"&gt;https://community.qlik.com/t5/Qlik-Sense-Documents/Handling-Refresh-Tokens-with-the-Qlik-REST-Connector/ta-p/1492836&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Please don't forget to mark the response as "Solution Accepted"&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Mon, 29 Nov 2021 16:52:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Dynamically-set-token-in-REST-connector-queryHeaders-TopDesk/m-p/1864552#M15950</guid>
      <dc:creator>NadiaB</dc:creator>
      <dc:date>2021-11-29T16:52:24Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically set token in REST-connector queryHeaders (TopDesk)</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Dynamically-set-token-in-REST-connector-queryHeaders-TopDesk/m-p/1867286#M15988</link>
      <description>&lt;P&gt;Thank you for your reply. This is a good step in the right direction, but one thing eludes me. How is the connection you initially make related to the 'HTTPHEADER'-clause. In the provided example; all of the sudden the word 'Bearer' appears in the HTTPHEADER. But why? Should it always be there?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As for me:&amp;nbsp; A new connection works, but I can't even overwrite the connection with the same values, let alone with a new token.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TopDesk_Totaal.png" style="width: 586px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/68014i932E432318ADEE9C/image-size/large?v=v2&amp;amp;px=999" role="button" title="TopDesk_Totaal.png" alt="TopDesk_Totaal.png" /&gt;&lt;/span&gt;&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;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Dec 2021 21:09:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Dynamically-set-token-in-REST-connector-queryHeaders-TopDesk/m-p/1867286#M15988</guid>
      <dc:creator>Lemac</dc:creator>
      <dc:date>2021-12-06T21:09:19Z</dc:date>
    </item>
  </channel>
</rss>

