Forum Discussion
Anonymous
7 years agoNot applicable
Google Oauth2 (Google My Business API)
Hi, I've done a lot of searching on this the past couple of days but keep hitting a brick wall. Basically I'm looking to use the Google My Business API within Power BI. Now I manage to connec...
Anonymous
7 years agoNot applicable
Anonymous,
Please change the second code block to the following:
let
app_credentials ="client_id=XXXXXXm&client_secret=XXXXXX",
url = app_credentials & "&refresh_token=" & "xxxxx" & "&grant_type=refresh_token",
GetJson = Web.Contents("https://accounts.google.com/o/oauth2/token",
[
Headers = [#"Content-Type"="application/x-www-form-urlencoded"],
Content = Text.ToBinary(url)
]
),
AccessToken = Json.Document(GetJson)[access_token],
AccessTokenHeader = "bearer " & AccessToken,
GetJsonQuery = Web.Contents("***url to access google my business reviews***",
[
Headers = [#"Authorization"=AccessTokenHeader]
]
),
FormatAsJsonQuery = Json.Document(GetJsonQuery)
in
FormatAsJsonQuery
There is a similar thread for your reference.
https://community.powerbi.com/t5/Service/Refresh-API-GOOGLE-ANALYTICS/td-p/270807
Regards,
Lydia