access delegated mail folder with gmail api

三世轮回 提交于 2019-12-04 07:14:37

问题


let's say there are alice@gmail.com and bob@gmail.com. Alice has delegated her account to Bob. When I authenticate with Bob and try to list Alice inbox using the REST interface I get a 403 error:

bob@gmail.com does not have privileges to alice@gmail.com mailbox.

The URL used to query the inbox is:

www.googleapis.com/gmail/v1/users/alice@gmail.com/messages

When I use bob@gmail.com (or me) as userId there is no problem. How do I access Alice's account?

Greetings


回答1:


You would need to get alice's consent and oauth token to access alice's account through the API--delegation is not supported like it is in the web interface.



来源:https://stackoverflow.com/questions/25670006/access-delegated-mail-folder-with-gmail-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!