使用GSuite Drive API v3中的凭证凭据是否有所更改?

时间:2019-01-10 15:35:42

标签: google-drive-api

我以前曾经在大约1000个帐户上运行过一些代码,而没有这个问题,突然之间一切都停止了。

代码处理从gsuite删除帐户并将驱动器文件下载到本地存储以进行保存。

我正在使用带有驱动器v3 api的服务帐户。服务帐户具有“域范围委托”,并具有范围的权限:https://www.googleapis.com/auth/drive

我通过以下方式委派访问用户帐户:

delegated_credentials = credential.create_delegated(account_name)
http = delegated_credentials.authorize(httplib2.Http())
service=discovery.build(api, version, http=http)

错误是: googleapiclient.errors.HttpError:https://www.googleapis.com/drive/v3/files//export?mimeType=application%2Fvnd.openxmlformats-officedocument.wordprocessingml.document返回“用户对该文件没有足够的权限。“>

最近有没有其他人开始遇到这种类型的问题?我不经常运行此代码,最后一次大概是6个月前。我知道google在google +上遇到了api问题,也许我错过了某些更改?

非常感谢您的帮助。

0 个答案:

没有答案