<?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 Automating retrieval of access tokens from a REST API in Connectivity &amp; Data Prep</title>
    <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Automating-retrieval-of-access-tokens-from-a-REST-API/m-p/1448578#M3307</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to automate the retrieval of access tokens from the Super Office Online API.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From what I have understood what I need to do is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Send a GET request using a token identifier to super office which is authenticated which gives me a access token.&lt;/LI&gt;&lt;LI&gt;Note when the token expires and then do a POST request with a update key to update the access token.&lt;/LI&gt;&lt;LI&gt;Fetch new access token and use this next time it is needed to fetch data.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I haven't done anything similar, but I have managed to do it somewhat with Qlik Sense and creating a web page that gets the access token back using a local hosted webpage on a webservice. Now I want to do it using Qlik Sense and want to understand if that is possible and how?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The syntax for retrieving the access token with super office is: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://online.superoffice.com/login/common/oauth/authorize?response_type=token" style="color: #0033a0; font-family: Roboto, sans-serif; font-size: 14px;"&gt;https://online.superoffice.com/login/common/oauth/authorize?response_type=token&lt;/A&gt;&lt;SPAN style="color: #263238; font-family: Roboto, sans-serif; font-size: 14px;"&gt; &amp;amp;client_id=670734e0-4c5a-11e3-be9e-a171392e81db &amp;amp;redirect_uri=&lt;/SPAN&gt;&lt;A href="https://example.com/spa/" style="color: #0033a0; font-family: Roboto, sans-serif; font-size: 14px;"&gt;https://example.com/spa/&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the access token is returned at the URL defined after redirect_uri.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions or ideas is appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ali&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 22 Dec 2017 12:10:06 GMT</pubDate>
    <dc:creator>bwisealiahmad</dc:creator>
    <dc:date>2017-12-22T12:10:06Z</dc:date>
    <item>
      <title>Automating retrieval of access tokens from a REST API</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Automating-retrieval-of-access-tokens-from-a-REST-API/m-p/1448578#M3307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to automate the retrieval of access tokens from the Super Office Online API.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From what I have understood what I need to do is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Send a GET request using a token identifier to super office which is authenticated which gives me a access token.&lt;/LI&gt;&lt;LI&gt;Note when the token expires and then do a POST request with a update key to update the access token.&lt;/LI&gt;&lt;LI&gt;Fetch new access token and use this next time it is needed to fetch data.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I haven't done anything similar, but I have managed to do it somewhat with Qlik Sense and creating a web page that gets the access token back using a local hosted webpage on a webservice. Now I want to do it using Qlik Sense and want to understand if that is possible and how?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The syntax for retrieving the access token with super office is: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://online.superoffice.com/login/common/oauth/authorize?response_type=token" style="color: #0033a0; font-family: Roboto, sans-serif; font-size: 14px;"&gt;https://online.superoffice.com/login/common/oauth/authorize?response_type=token&lt;/A&gt;&lt;SPAN style="color: #263238; font-family: Roboto, sans-serif; font-size: 14px;"&gt; &amp;amp;client_id=670734e0-4c5a-11e3-be9e-a171392e81db &amp;amp;redirect_uri=&lt;/SPAN&gt;&lt;A href="https://example.com/spa/" style="color: #0033a0; font-family: Roboto, sans-serif; font-size: 14px;"&gt;https://example.com/spa/&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the access token is returned at the URL defined after redirect_uri.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions or ideas is appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ali&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Dec 2017 12:10:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Automating-retrieval-of-access-tokens-from-a-REST-API/m-p/1448578#M3307</guid>
      <dc:creator>bwisealiahmad</dc:creator>
      <dc:date>2017-12-22T12:10:06Z</dc:date>
    </item>
    <item>
      <title>Re: Automating retrieval of access tokens from a REST API</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Automating-retrieval-of-access-tokens-from-a-REST-API/m-p/1448579#M3308</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Any ideas &lt;A href="https://community.qlik.com/qlik-users/146975"&gt;petter-s&lt;/A&gt;‌? &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jan 2018 23:28:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Automating-retrieval-of-access-tokens-from-a-REST-API/m-p/1448579#M3308</guid>
      <dc:creator>bwisealiahmad</dc:creator>
      <dc:date>2018-01-08T23:28:30Z</dc:date>
    </item>
    <item>
      <title>Re: Automating retrieval of access tokens from a REST API</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Automating-retrieval-of-access-tokens-from-a-REST-API/m-p/1448580#M3309</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes - I did something similar back in August last year. Not with the SuperOffice API but with another product which needed the same approach as a demo. I'll see if I can find the info later.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jan 2018 07:28:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Automating-retrieval-of-access-tokens-from-a-REST-API/m-p/1448580#M3309</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2018-01-09T07:28:22Z</dc:date>
    </item>
    <item>
      <title>Re: Automating retrieval of access tokens from a REST API</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Automating-retrieval-of-access-tokens-from-a-REST-API/m-p/1448581#M3310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've managed to return the access token to a localhost site I've made and hosted with xampp which returns&amp;nbsp; the access token, but I can't seem to figure out how to return that type of response directly in Qlik Sense. To get the access token returned in some format in Qlik Sense so that I can keep everything within Qlik.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jan 2018 08:13:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Automating-retrieval-of-access-tokens-from-a-REST-API/m-p/1448581#M3310</guid>
      <dc:creator>bwisealiahmad</dc:creator>
      <dc:date>2018-01-09T08:13:02Z</dc:date>
    </item>
    <item>
      <title>Re: Automating retrieval of access tokens from a REST API</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Automating-retrieval-of-access-tokens-from-a-REST-API/m-p/1448582#M3311</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The trick is to first read the access token by making sure that you select also the headers where the access token most likely is returned.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then you have to get it out of the table by using Peek and a variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lastly you can use variable through $-sign expansion or directly to include the token in subsequent requests either in the the connection string or via the SQL command of the REST connector inside the WITH CONNECTION part of the SQL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a QlikView QVW that was part of a proof-of-concept for doing this against some other API that wasn't SuperOffice. I have attached it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 14 Jan 2018 14:21:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Automating-retrieval-of-access-tokens-from-a-REST-API/m-p/1448582#M3311</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2018-01-14T14:21:25Z</dc:date>
    </item>
    <item>
      <title>Re: Automating retrieval of access tokens from a REST API</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Automating-retrieval-of-access-tokens-from-a-REST-API/m-p/1554721#M3681</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/50207"&gt;@bwisealiahmad&lt;/a&gt;: Do you have some sample code to get the REST API connector working with SuperOffice?&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/41481"&gt;@petter&lt;/a&gt;: The QVW you shared fails to load when I open it with QV Desktop. Maybe a version problem? Could you maybe share a new version or just the script part?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 11 Mar 2019 09:42:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Automating-retrieval-of-access-tokens-from-a-REST-API/m-p/1554721#M3681</guid>
      <dc:creator>freinholdson</dc:creator>
      <dc:date>2019-03-11T09:42:00Z</dc:date>
    </item>
  </channel>
</rss>

