We created an application for Google Apps Marketplace. We want our application to check how many emails each user sent and received per day. I tried to test the form on https://developers.google.com/gmail/api/v1/reference/users/messages/list, and it worked when a user or admin types "me" as userId
, but when the domain admin types the email address of a user, he receives an error message:
{
"error": {
"errors": [
{
"domain": "global",
"reason": "forbidden",
"message": "Delegation denied for admin@<domain>"
}
],
"code": 403,
"message": "Delegation denied for admin@<domain>"
}
}
(<domain>
is the domain I tested).
Is it possible for a domain admin to list the messages of users except himself? I didn't find it listed in the documentation.
Update: I tried to authenticate with the user's email address from our application and then it worked. But I would prefer to authenticate with the domain admin's email address.