Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Integrate Google Search Console API into Power BI

I'm using the Google Search Console API to retrieve the information and insert it into Power BI.
I already have OAuth 2.0 client ID credentials with application type "WEB"

In Power BI I selected the option Get data -> Blank query and I have the following query:

 

let
request = Web.Contents("https://www.googleapis.com/webmasters/v3/sites/mywebsite.com/searchAnalytics/query?startDate=2022-01-01&endDate=2022-11-01", [Headers=[ #"auth_method"="OAuth 2.0", #"client_id"="xxx", #"client_secret"="xxx", #"auth_uri"="https://accounts.google.com/o/oauth2/auth" , #"token_uri"="https://oauth2.googleapis.com/token", #"redirect_uris"="http://localhost"]])
in
request


I tested it in postman with the same url and with the same access data and it works correctly but here in Power BI it gives me the following error:

DataSource.Error: Web.Contents could not get content from 'https://www.googleapis.com/webmasters/v3/sites/mywebiste.com/searchAnalytics/query?startDate=2022-01-01&endDate=2022-11- 01' (404): Not Found
Details:
DataSourceKind=Web
DataSourcePath=https://www.googleapis.com/webmasters/v3/sites/mywebiste.com/searchAnalytics/query
Url=https://www.googleapis.com/webmasters/v3/sites/mywebiste.com/searchAnalytics/query?startDate=2022-01-01&endDate=2022-11-01

 

Can you help me?

Thanks!

3 Replies