[英]How to export file from shared drive GCP using service account
I am trying to do export from slides to pdf using service account.我正在尝试使用服务帐户从幻灯片导出到 pdf。
Is there any way to export that file unless using OAuth 2.0 client?除非使用 OAuth 2.0 客户端,否则有什么方法可以导出该文件?
supportsAllDrives=true
supportsAllDrives=true
Usually this option is not necessary as long as the file is explicitly shared with the service account.只要文件明确与服务帐户共享,通常不需要此选项。 However, if you are running into any issues you can do is to use impersonation .
但是,如果您遇到任何问题,您可以使用impersonation 。
This means that the service acocunt can autenticate as you (or any other domain-user) and perform requests on behalf of this user.这意味着服务帐户可以作为您(或任何其他域用户)进行身份验证并代表该用户执行请求。
This will allow the service account to access files on your Drive as if it were the owner of those files.这将允许服务帐户访问您云端硬盘上的文件,就好像它是这些文件的所有者一样。
To set up a service account - follow the steps specified in the documentation.要设置服务帐户 - 请按照文档中指定的步骤操作。
Most important:最重要的:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.