对于Google Workspace,我正在尝试将所有用户的A列表放在一起。我域中的其他联系人
我想为我域中的所有用户获取“其他联系人”列表。目前,我可以在以下内容中获取用户的“其他联系人”列表:
results = service.otherContacts().list(
readMask="names,emailAddresses").execute()
但是是否有一种方法可以获取其他用户的列表?
I want to get the "Other Contacts" List for all users in my domain. I can currently get my user's "Other Contacts" list with the following:
results = service.otherContacts().list(
readMask="names,emailAddresses").execute()
But is there a way to get other users' lists as well?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您已经可以使用该代码获得“其他联系人”,那么您需要实现的只是
用户模仿
在您的代码中,类似于:由于创建服务帐户并生成JSON文件密钥,您需要配置域名范围范围的委派使用服务帐户的客户端ID以及您将使用的范围。
If you already can get your 'Other contacts' with that code, all you need to implement is
user impersonation
in your code, something like:And since you are using Google Workspace after you create your Service Account and generate the JSON file key you will need to configure Domain Wide Delegation using the client ID of your Service Account plus the scopes you will use.