<?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: Authentication issue with Google API connection in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Authentication-issue-with-Google-API-connection/m-p/4017415#M53800</link>
    <description>&lt;P style="margin: 0in; font-family: tahoma; font-size: 11.0pt;"&gt;Hi @Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P style="margin: 0in; font-family: tahoma; font-size: 11.0pt;"&gt;Can you please share some more detail information about this issue? They should help us clarify your scenario and test to troubleshoot.&lt;/P&gt;
&lt;P style="margin: 0in; font-family: tahoma; font-size: 11.0pt;"&gt;&lt;A href="http://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490" target="_blank"&gt;How to Get Your Question Answered Quickly&amp;nbsp;&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: tahoma; font-size: 11.0pt;"&gt;Regards,&lt;/P&gt;
&lt;P style="margin: 0in; font-family: tahoma; font-size: 11.0pt;"&gt;Xiaoxin Sheng&lt;/P&gt;</description>
    <pubDate>Mon, 01 Jul 2024 01:09:06 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-07-01T01:09:06Z</dc:date>
    <item>
      <title>Authentication issue with Google API connection</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Authentication-issue-with-Google-API-connection/m-p/4016029#M53786</link>
      <description>&lt;P&gt;I am connecting with Google Translate API without any problem in PowerQuery, I use my access-token and I get the json response flawlessly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But then, when i close the Query Editor and the data starts to refresh I am getting an error when trying to authenticate with &lt;A href="http://www.translation.googleapis.com" target="_blank"&gt;www.translation.googleapis.com&lt;/A&gt;&amp;nbsp;anonymously.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have also set "Ignore Privacy Levels" in case that was related to the issue but nothing changes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any way to resolve this?&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jun 2024 16:12:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Authentication-issue-with-Google-API-connection/m-p/4016029#M53786</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-06-28T16:12:44Z</dc:date>
    </item>
    <item>
      <title>Re: Authentication issue with Google API connection</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Authentication-issue-with-Google-API-connection/m-p/4017415#M53800</link>
      <description>&lt;P style="margin: 0in; font-family: tahoma; font-size: 11.0pt;"&gt;Hi @Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P style="margin: 0in; font-family: tahoma; font-size: 11.0pt;"&gt;Can you please share some more detail information about this issue? They should help us clarify your scenario and test to troubleshoot.&lt;/P&gt;
&lt;P style="margin: 0in; font-family: tahoma; font-size: 11.0pt;"&gt;&lt;A href="http://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490" target="_blank"&gt;How to Get Your Question Answered Quickly&amp;nbsp;&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: tahoma; font-size: 11.0pt;"&gt;Regards,&lt;/P&gt;
&lt;P style="margin: 0in; font-family: tahoma; font-size: 11.0pt;"&gt;Xiaoxin Sheng&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jul 2024 01:09:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Authentication-issue-with-Google-API-connection/m-p/4017415#M53800</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-07-01T01:09:06Z</dc:date>
    </item>
    <item>
      <title>Re: Authentication issue with Google API connection</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Authentication-issue-with-Google-API-connection/m-p/4018860#M53821</link>
      <description>&lt;P&gt;&lt;SPAN&gt;This is the function I'm using. It gets the data without any issue on the Query Editor, but the anonymous connection fails when refreshing the data on the PowerBI app. I've hidden the token a project name:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;let
Source = (ToBeTranslated as text, TargetLang as text) =&amp;gt; let
// Define the URL for the API endpoint
url = "https://translation.googleapis.com/language/translate/v2",

// Define the request headers
headers = [
#"Authorization" = "Bearer TokenHere",
#"x-goog-user-project" = "ProjectNameHere",
#"Content-Type" = "application/json; charset=utf-8"
],

// Define the request body
body = Json.FromValue([
q = { ToBeTranslated },
target = TargetLang
]),

// Make the POST request
response = Web.Contents(url, [
Headers = headers,
Content = body
]),

// Parse the JSON response
jsonResponse = Json.Document(response),
// Parse the JSON response
data = jsonResponse[data],
// Parse the JSON response
translations = data[translations],
// Parse the JSON response
translations1 = translations{0},
#"Converted to Table" = Record.ToTable(translations1),
#"Filtered Rows" = Table.SelectRows(#"Converted to Table", each ([Name] = "translatedText")),
#"Removed Columns" = Table.RemoveColumns(#"Filtered Rows",{"Name"})
in
#"Removed Columns"
in
Source&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 01 Jul 2024 15:34:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Authentication-issue-with-Google-API-connection/m-p/4018860#M53821</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-07-01T15:34:48Z</dc:date>
    </item>
    <item>
      <title>Re: Authentication issue with Google API connection</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Authentication-issue-with-Google-API-connection/m-p/4019860#M53840</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Have you tried to use the optional parameter relative path to processing your url? AFAIK, some of api with anonymous authorization only allow to receive the credentials on the root level:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;let
    Source = (ToBeTranslated as text, TargetLang as text) =&amp;gt;
        let
            // Define the URL for the API endpoint
            url = "https://translation.googleapis.com",
            // Define the request headers
            headers = [
                #"Authorization" = "Bearer TokenHere",
                #"x-goog-user-project" = "ProjectNameHere",
                #"Content-Type" = "application/json; charset=utf-8"
            ],
            path = "/language/translate/v2",
            // Define the request body
            body = Json.FromValue([
                q = {ToBeTranslated},
                target = TargetLang
            ]),
            // Make the POST request
            response = Web.Contents(url, [
                Headers = headers,
                RelativePath = path,
                Content = body
            ]),
            // Parse the JSON response
            jsonResponse = Json.Document(response),
            // Parse the JSON response
            data = jsonResponse[data],
            // Parse the JSON response
            translations = data[translations],
            // Parse the JSON response
            translations1 = translations{0},
            #"Converted to Table" = Record.ToTable(translations1),
            #"Filtered Rows" = Table.SelectRows(#"Converted to Table", each ([Name] = "translatedText")),
            #"Removed Columns" = Table.RemoveColumns(#"Filtered Rows", {"Name"})
        in
            #"Removed Columns"
in
    Source
&lt;/LI-CODE&gt;
&lt;P&gt;&lt;A href="https://blog.crossjoin.co.uk/2016/08/16/using-the-relativepath-and-query-options-with-web-contents-in-power-query-and-power-bi-m-code/" target="_self"&gt;Using The RelativePath And Query Options With Web.Contents() In Power Query And Power BI M Code&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Xiaoxin Sheng&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jul 2024 06:52:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Authentication-issue-with-Google-API-connection/m-p/4019860#M53840</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-07-02T06:52:56Z</dc:date>
    </item>
  </channel>
</rss>

