Gmail API - Delegating domain-wide authority to the service account to single user

老子叫甜甜 提交于 2021-01-28 17:58:12

问题


I am trying to access emails of an email address in custom domain(my.name@example.com) in google apps. I created service account but I get following error message when trying to read e-mails:

Error:"unauthorized_client", Description:"Unauthorized client or scope in request.", Uri:""

I found that I have to delegate domain-wide authority to the service account. According to my understanding, after delegating, the service account will have access to all e-mail addresses in the domain(eg; john@example.com, sam@example.com ...). Is my understanding correct. If yes, is there a way that service account has access (can be impersonated) to only one e-mail address in the domain?


回答1:


Have you authorized the Client Name and the API scopes in the GSuite admin console? It is required for the service account to work and the error you received seems to be related to the API access permissions.

More info at:

https://support.google.com/a/answer/162106?hl=en



来源:https://stackoverflow.com/questions/32354498/gmail-api-delegating-domain-wide-authority-to-the-service-account-to-single-us

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