【发布时间】:2021-06-15 02:54:56
【问题描述】:
我正在尝试将我的 Google 联系人(不是 GMail)委托给另一个帐户(相同的 Workspace)。 People API 没有委派联系人的选项,所以我尝试了Google Admin SDK - Contact Delegation API。但是,我找不到像其他 API 一样构建资源的方法。
如何创建资源然后委派我的联系人?我需要允许凭据工作的范围是多少?
对于其他 API,我使用以下代码:
from googleapiclient.discovery import build
# Load client_config
# Define scopes to autorize like -> scopes = ['https://www.googleapis.com/auth/admin.directory.user']
# Get the credentials into the creds variable
admin_service = build('admin', 'directory_v1', credentials=creds)
# use admin_service to create/update users in the workspace
我的最终目标是使用对模拟用户具有委派访问权限的服务帐户,并自动委派 gmail 和联系人。我已经能够让 gmail 委派工作,但不能让联系人委派工作。
我对 Google API 还很陌生,所以我可能忽略了文档中的某些内容。
【问题讨论】:
-
This issue 似乎指的是您要问的内容。记得点击左上角的白星(☆)。