google-api - Google Drive api 范围和文件访问(drive vs drive.files)

标签 google-api google-drive-api google-api-client

我为我创建了两个刷新 token :
一个为

SCOPE = 'https://www.googleapis.com/auth/drive'

和另一个
SCOPE = 'https://www.googleapis.com/auth/drive.file'

我正在尝试获取有关文件的信息(使用 get 方法)
使用 SCOPE 时可以获得的一些文件 drive.files ,有些仅在使用更广泛的范围时 开车

但我不知道这是什么原因?文件位于不同的文件夹中,但有一个共享的根文件夹。

最佳答案

不同之处在于“drive.file”仅授予您对您的应用创建的文件或用户已明确与您的应用共享的文件的权限,而“drive”授予您的应用查看用户驱动器中所有文件的权限。



https://developers.google.com/drive/web/scopes

关于google-api - Google Drive api 范围和文件访问(drive vs drive.files),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22403014/

相关文章:

google-api-javascript-client : How to get contents of file using Drive API?

google-api - Youtube API v3 按标签搜索自己的视频

google-drive-api - ParentReference 或 Google_ParentReference

java - 由 : java. lang.IllegalStateException 引起:GoogleApiClient 尚未连接

php - Google API - 每次都强制授予权限

python - 如何在实时网站上的 Django 中向 Google 授权应用程序

javascript - Google 自动完成 HTMLInputElement 错误

push-notification - AWS Lambda 和 Google Drive 推送通知集成可能吗?

google-drive-api - Objective-C 的 Google-API : no such file or directory - libGTLTouchStaticLib. a

c# - 使用 Google Analytics API 在 C# 中显示信息