Google Drive api 范围和文件访问(drive vs drive.files) [英] Google Drive api scope and file access (drive vs drive.files)

查看:33
本文介绍了Google Drive api 范围和文件访问(drive vs drive.files)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我为我创建了两个刷新令牌:一个为

I have created two refresh tokens for me: one for

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

和另一个

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

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

I'm trying to get information about files (using get method) Some files I can get when using SCOPE drive.files, and some only when using wider scope drive

但我想不通这是什么原因?文件位于不同的文件夹中,但具有一个共享根文件夹.

But I can not figure out what is the reason for that? Files are located in different folders but have one shared root folder.

推荐答案

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

The difference is that 'drive.file' only gives you permission to files that your app has created or the user has explicitly shared with your app, whereas 'drive' gives your app permission to see the all the files in the user's drive.

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

这篇关于Google Drive api 范围和文件访问(drive vs drive.files)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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