<?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 Refresh API Token Dynamically in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Refresh-API-Token-Dynamically/m-p/1995596#M82409</link>
    <description>&lt;P&gt;Hello everyone,&lt;/P&gt;
&lt;P&gt;I fetching data from an API that requires a token that expires after a few minutes. It has a header that says X-Authorization and then the token I get from another API. Since I am not en API expert, I have checked a tutorial on how to make this dynamically instead of opening the connector every time the token expires. However, I keep getting errors.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is what my script looks like:&lt;/P&gt;
&lt;P&gt;Here I fetch the token I need.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Rolando_Montero_0-1666361961029.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/91896i592E0D31D1B11AE1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Rolando_Montero_0-1666361961029.png" alt="Rolando_Montero_0-1666361961029.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The REST connection looks as follows&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Rolando_Montero_3-1666362305157.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/91902i9E42C9E3DFA084E7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Rolando_Montero_3-1666362305157.png" alt="Rolando_Montero_3-1666362305157.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Rolando_Montero_4-1666362333991.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/91903iC1BDE127DF0263D5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Rolando_Montero_4-1666362333991.png" alt="Rolando_Montero_4-1666362333991.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Finally, this is the loading script&lt;/P&gt;
&lt;P&gt;This is the second connection where I fetch the data that requires the token I mentioned.&amp;nbsp; I have read that when you use the statement WITH CONNECTION overrides the data you have set up on the REST connection.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Rolando_Montero_2-1666362168846.png" style="width: 539px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/91901iF09AFDB992796837/image-dimensions/539x237?v=v2" width="539" height="237" role="button" title="Rolando_Montero_2-1666362168846.png" alt="Rolando_Montero_2-1666362168846.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;After running the script, I get the following error&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Rolando_Montero_5-1666362490196.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/91905i34C2842C1C49A479/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Rolando_Montero_5-1666362490196.png" alt="Rolando_Montero_5-1666362490196.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I do not know if I have to add the X-Authorization statement in the script or if I am missing some parameters.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope you can help me!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&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;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 21 Oct 2022 14:29:37 GMT</pubDate>
    <dc:creator>Rolando_Montero</dc:creator>
    <dc:date>2022-10-21T14:29:37Z</dc:date>
    <item>
      <title>Refresh API Token Dynamically</title>
      <link>https://community.qlik.com/t5/App-Development/Refresh-API-Token-Dynamically/m-p/1995596#M82409</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;
&lt;P&gt;I fetching data from an API that requires a token that expires after a few minutes. It has a header that says X-Authorization and then the token I get from another API. Since I am not en API expert, I have checked a tutorial on how to make this dynamically instead of opening the connector every time the token expires. However, I keep getting errors.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is what my script looks like:&lt;/P&gt;
&lt;P&gt;Here I fetch the token I need.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Rolando_Montero_0-1666361961029.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/91896i592E0D31D1B11AE1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Rolando_Montero_0-1666361961029.png" alt="Rolando_Montero_0-1666361961029.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The REST connection looks as follows&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Rolando_Montero_3-1666362305157.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/91902i9E42C9E3DFA084E7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Rolando_Montero_3-1666362305157.png" alt="Rolando_Montero_3-1666362305157.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Rolando_Montero_4-1666362333991.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/91903iC1BDE127DF0263D5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Rolando_Montero_4-1666362333991.png" alt="Rolando_Montero_4-1666362333991.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Finally, this is the loading script&lt;/P&gt;
&lt;P&gt;This is the second connection where I fetch the data that requires the token I mentioned.&amp;nbsp; I have read that when you use the statement WITH CONNECTION overrides the data you have set up on the REST connection.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Rolando_Montero_2-1666362168846.png" style="width: 539px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/91901iF09AFDB992796837/image-dimensions/539x237?v=v2" width="539" height="237" role="button" title="Rolando_Montero_2-1666362168846.png" alt="Rolando_Montero_2-1666362168846.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;After running the script, I get the following error&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Rolando_Montero_5-1666362490196.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/91905i34C2842C1C49A479/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Rolando_Montero_5-1666362490196.png" alt="Rolando_Montero_5-1666362490196.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I do not know if I have to add the X-Authorization statement in the script or if I am missing some parameters.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope you can help me!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&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;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Oct 2022 14:29:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Refresh-API-Token-Dynamically/m-p/1995596#M82409</guid>
      <dc:creator>Rolando_Montero</dc:creator>
      <dc:date>2022-10-21T14:29:37Z</dc:date>
    </item>
  </channel>
</rss>

