使用gmail api访问委托邮件文件夹
问题描述:
假设有[email protected]和[email protected]。爱丽丝已将她的帐户委托给鲍勃。当我与鲍勃进行身份验证,并尝试使用REST接口,我得到一个403错误列出爱丽丝收件箱:使用gmail api访问委托邮件文件夹
[email protected] does not have privileges to [email protected] mailbox.
用于查询信箱网址是:
www.googleapis.com/gmail/v1/users/[email protected]/messages
当我使用鲍勃@ gmail的.com(或我)作为userId没有问题。我如何访问Alice的帐户?
问候
答
你需要得到Alice的同意和OAuth令牌通过API访问Alice的帐户 - 不支持像代表团是在Web界面。