Gmail API domain-wide delegation
问题 I am using Gmail API and I am trying to fetch emails from all users under company. But when I run code such as: function runAPI(auth) { var gmail = google.gmail('v1'); gmail.users.threads.list({auth: auth, userId: '108800016305523828361'},'',function(err, response){ if (err) { console.log("The API returned an error: " + err); return; } var threads = response.threads; console.log(threads); }) } I get error: The API returned an error: Error: Delegation denied for xxxx@xxxxx.com In admin console