<?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: Issue with authorization key for Google Business in Connectivity &amp; Data Prep</title>
    <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Issue-with-authorization-key-for-Google-Business/m-p/1612296#M7679</link>
    <description>&lt;P&gt;I've read that one and could not figure out anything that was incorrect in the project settings or otherwise unfortunately.&lt;/P&gt;</description>
    <pubDate>Wed, 14 Aug 2019 08:45:07 GMT</pubDate>
    <dc:creator>niclaz79</dc:creator>
    <dc:date>2019-08-14T08:45:07Z</dc:date>
    <item>
      <title>Issue with authorization key for Google Business</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Issue-with-authorization-key-for-Google-Business/m-p/1612252#M7677</link>
      <description>&lt;P&gt;Hi, I'm trying to run the following script in order to refresh my authorization key for a Google Business account. I can use the playground to obtain it manually, but obviously I need to be able to automate it in Qlik Sense.&lt;/P&gt;&lt;P&gt;I have changed the client id, client secret and refresh token secrets for this post, but there are real values there in the actual code&lt;/P&gt;&lt;P&gt;SET vClient_id = '&lt;EM&gt;client id&lt;/EM&gt;';&lt;BR /&gt;SET vClient_secret = '&lt;EM&gt;client secret&lt;/EM&gt;';&lt;/P&gt;&lt;P&gt;SET vRefresh_token = '&lt;EM&gt;refresh token&lt;/EM&gt;';&lt;/P&gt;&lt;P&gt;LET vRequestBody ='';&lt;BR /&gt;LET vRequestBody = vRequestBody &amp;amp; 'grant_type=refresh_token';&lt;BR /&gt;LET vRequestBody = vRequestBody &amp;amp; '&amp;amp;client_id=' &amp;amp; '$(vClient_id)';&lt;BR /&gt;LET vRequestBody = vRequestBody &amp;amp; '&amp;amp;client_secret=' &amp;amp; '$(vClient_secret)';&lt;BR /&gt;LET vRequestBody = vRequestBody &amp;amp; '&amp;amp;refresh_token=' &amp;amp; '$(vRefresh_token)';&lt;/P&gt;&lt;P&gt;LIB CONNECT TO 'Google Authorization';&lt;/P&gt;&lt;P&gt;access_token:&lt;BR /&gt;SQL SELECT&lt;BR /&gt;"access_token",&lt;BR /&gt;"token_type",&lt;BR /&gt;"expires_in"&lt;BR /&gt;FROM JSON (wrap on) "root"&lt;BR /&gt;WITH CONNECTION (&lt;BR /&gt;URL "&lt;A href="https://accounts.google.com/o/oauth2/token" target="_blank" rel="nofollow noopener noreferrer"&gt;https://accounts.google.com/o/oauth2/token&lt;/A&gt;",&lt;BR /&gt;HTTPHEADER "Content-Type" "application/x-www-form-urlencoded",&lt;BR /&gt;BODY "$(vRequestBody)"&lt;BR /&gt;)&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;LET vAccessToken = peek('access_token',0,'access_token');&lt;/P&gt;&lt;P&gt;I get the following error message:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;HTTP protocol error 400 (Bad Request): { "error": "invalid_grant", "error_description": "Bad Request" }&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;I feel there could be a setting on the Google Business side that I need to make, but I cannot find any resources that tells me what that is. And as I said, it works fine in playground to get a new authorization code.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Apr 2021 08:38:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Issue-with-authorization-key-for-Google-Business/m-p/1612252#M7677</guid>
      <dc:creator>niclaz79</dc:creator>
      <dc:date>2021-04-02T08:38:26Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with authorization key for Google Business</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Issue-with-authorization-key-for-Google-Business/m-p/1612281#M7678</link>
      <description>&lt;P&gt;"Invalid Grant" seems to be a very generic error but mostly its related to tokens and access permissions. It can be as simple as the user blocking the access or that the tokens themselves are old. There is a great post about this issue here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://blog.timekit.io/google-oauth-invalid-grant-nightmare-and-how-to-fix-it-9f4efaf1da35#.eqa5iwbkt" target="_blank"&gt;https://blog.timekit.io/google-oauth-invalid-grant-nightmare-and-how-to-fix-it-9f4efaf1da35#.eqa5iwbkt&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Aug 2019 08:13:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Issue-with-authorization-key-for-Google-Business/m-p/1612281#M7678</guid>
      <dc:creator>gustavgager</dc:creator>
      <dc:date>2019-08-14T08:13:55Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with authorization key for Google Business</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Issue-with-authorization-key-for-Google-Business/m-p/1612296#M7679</link>
      <description>&lt;P&gt;I've read that one and could not figure out anything that was incorrect in the project settings or otherwise unfortunately.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Aug 2019 08:45:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Issue-with-authorization-key-for-Google-Business/m-p/1612296#M7679</guid>
      <dc:creator>niclaz79</dc:creator>
      <dc:date>2019-08-14T08:45:07Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with authorization key for Google Business</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Issue-with-authorization-key-for-Google-Business/m-p/1612306#M7680</link>
      <description>&lt;P&gt;Maybe you could try setting up some new credentials on your own account? You might also have to enable the specific APIs you want to use.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Aug 2019 09:08:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Issue-with-authorization-key-for-Google-Business/m-p/1612306#M7680</guid>
      <dc:creator>gustavgager</dc:creator>
      <dc:date>2019-08-14T09:08:57Z</dc:date>
    </item>
  </channel>
</rss>

