-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
Description
Expected Behavior
I try to access the https://developers.google.com/apis-explorer/#search/stats/m/blogger/v3/blogger.pageViews.get with Google Apps Script.
Sample URL:
Description:
function bloggerAPI() {
var api = "https://www.googleapis.com/blogger/v3/users/self/blogs";
var headers = {
"Authorization": "Bearer " + getService().getAccessToken()
};
var options = {
"headers": headers,
"method" : "GET",
"muteHttpExceptions": true
};
var response = UrlFetchApp.fetch(api, options);
var json = JSON.parse(response.getContentText());
for (var i in json.items) {
Logger.log("[%s] %s %s", json.items[i].id, json.items[i].name, json.items[i].url);
}
}
Actual Behavior
ReferenceError: "getService" is not defined. (line 18, file "Code")
Steps to Reproduce the Problem
- write the code
- the project is link for authorization
1.I got the error