service-accounts

Unable to query Google Search Console API using a Service Account

依然范特西╮ 提交于 2020-08-24 03:48:03
问题 I need to retrieve some data from Google Search Console (Webmaster Tools) using a service account. So far I've been able to retrieve an access_token for the service account which I need to append to the url of the request. The problem is that I can't find a way to do so, this is the code i'm using: function retrieveSearchesByQuery(token) { gapi.client.webmasters.searchanalytics.query( { 'access_token': token, 'siteUrl': 'http://www.WEBSITE.com', 'fields': 'responseAggregationType,rows',