访问用户 Google Drive 上的所有文件 [英] Access to all files on a user's Google Drive

查看:10
本文介绍了访问用户 Google Drive 上的所有文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

SkyDrive 和 Dropbox 的 api 具有管理用户整个驱动器的选项.对于 Google Drive,drive.file 范围似乎只允许访问应用程序创建的文件.Google Drive 是否有可以访问整个驱动器的范围?

The api's for SkyDrive and Dropbox have options for managing the user's entire drive. For Google Drive, the drive.file scope seems to give only access to the files created by the app. Is there a scope for Google Drive that gives access to the entire drive?

推荐答案

以下答案正确的,但最新版本的 Drive API 允许使用 请求完整范围https://www.googleapis.com/auth/drive.此用例不再需要 Documents List API.请参阅 https://developers.google.com/drive/scopes#requesting_full_drive_scope_for_an_app

The below answer was correct, but the latest version of the Drive API allows requesting of a full scope with https://www.googleapis.com/auth/drive. The Documents List API is no longer needed for this use case. See https://developers.google.com/drive/scopes#requesting_full_drive_scope_for_an_app

确切地说,Drive API 允许访问由应用创建的文件以及用户从 Drive UI(通过打开方式)使用应用打开的文件.

To be precise the Drive API gives access to Files created by the app and files that the user has opened with the app from the Drive UI (through open-with).

要操作用户的所有云端硬盘文件,您可以使用 Google 文档列表API .尽管我们目前禁止 Drive 应用程序(通过 Open-with 和 Create 对话框集成到 Drive UI 中的应用程序)请求访问 Document List API,因为我们希望将 Drive 应用程序保持在每个文件的安全模型上.(基本上在 Drive SDK 设置中添加 Document List 范围会引发错误).

To manipulate all of the Drive files of the user you can use the Google Document List API . Though we currently forbid Drive applications (the ones that have get integrated in the Drive UI through the Open-with and Create dialogs) to request access to the Document List API as we want to keep Drive application on a per-file security model. (Basically adding the Document List scope in the Drive SDK settings raises an error).

这篇关于访问用户 Google Drive 上的所有文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆