我正在尝试将我的谷歌联系人(不是GMail)委托给另一个帐户(同一个工作区)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代表团工作了,但没有联系代表团
我对谷歌API相当陌生,所以我可能忽略了文档中的某些内容
问题已经解决。它不打算有一个发现文件,因此客户端不能使用它来生成所需的方法。您需要做的是直接调用RESTAPI。记住在头上添加OAuth标记
相关问题 更多 >
编程相关推荐