javascript - 使用 Google 服务帐户访问团队组织内的 Google 云端硬盘文件夹

标签 javascript google-drive-api

使用 Oauth2 和 Google 的 API,我已经通过服务帐户设置了访问权限,但在设置对我们团队组织内特定文件夹的访问权限方面遇到了困难。

目前,我可以执行我想要的方法调用(列表、权限、复制),但驱动器中的项目只是入门文件。我不完全确定这是从哪个驱动器中提取的,因为我设置服务的任何帐户中都不存在该驱动器。

我的问题:

  • 使用服务帐户设置驱动器集成时,使用的默认驱动器是什么以及如何通过开发控制台或 gmail 帐户访问它?

  • 您是否能够访问组织/团队文件夹并向其中添加文件?

再次感谢您的帮助!

最佳答案

使用的驱动资源将是在 Google Dev console 中生成服务帐户的 Google 帐户。 .

A service account is a special type of Google account that belongs to your application or a virtual machine (VM), instead of to an individual end user. Your application calls Google APIs assuming the identity of the service account, so that the users aren't directly involved. A service account can have zero or more pairs of service account keys, which are used to authenticate to Google.

您是否能够访问组织/团队文件夹并向其中添加文件?

如果您的应用程序使用服务帐户登录,那么您授予权限的人绝对可以访问它并根据您授予他们的 Angular 色修改内容。

您可以在 Using OAuth 2.0 for Server to Server Applications 中阅读更多服务帐户信息.

关于javascript - 使用 Google 服务帐户访问团队组织内的 Google 云端硬盘文件夹,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43239267/

相关文章:

javascript - 正则表达式略贪心捕获?

javascript - 有 angularjs 的 slim 框架问题,即 404?

android - 从自行实现的 Android 应用程序访问 Google Drive

php - 如何使用 google docs api php 插入文本

java - 我的应用程序无法在谷歌驱动器的 "appDataFolder"中创建文件

android - GoogleApiClient.ConnectionCallbacks 编译时错误

javascript - Jquery Fancybox 无法显示图像

javascript - HTML 5视频播放器用给定的数字更新currentTime

android - 通过 Google Drive SDK 列出 Google Drive 中的所有可用文件

javascript - 标签覆盖记录