Open
Description
Expected Behavior
Hey guys,
I followed tutorial on google app script quick start for gmail API here
What i'm getting in the app script is this
GoogleJsonResponseException: API call to gmail.users.labels.list failed with error: Request had insufficient authentication scopes. (line 5, file "Code")
The code followed is exactly the same as the tutorial, I also enabled gmail in Resources > Advance Google Service
/**
* Lists the labels in the user's account.
*/
function listLabels() {
var response = Gmail.Users.Labels.list('me');
if (response.labels.length == 0) {
Logger.log('No labels found.');
} else {
Logger.log('Labels:');
for (var i = 0; i < response.labels.length; i++) {
var label = response.labels[i];
Logger.log('- %s', label.name);
}
}
}
I thought its going to be easier for me to integrate stuff in google ecosystem. Right now my other way is to create my own server and use node js to use gmail api. can anyone help me please?
Thanks
Metadata
Metadata
Assignees
Labels
No labels