sharedWithMe不适用于drive.file范围 [英] sharedWithMe does not work with drive.file scope

查看:87
本文介绍了sharedWithMe不适用于drive.file范围的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用范围为drive.file的.NET Google云端硬盘应用程序.我的应用程序没有通过查询Q = sharedWithMe显示共享文件列表.但是,当我更改应用程序的范围以驱动文件列表时,会出现该列表.范围设置为drive.file时为什么不起作用?我在云端硬盘控制台上创建了另一个项目,并对其进行了测试,但再次失败.

I am working on a .NET Google Drive app with scope drive.file. My app does not show up the list of shared files through the query Q = sharedWithMe. However, when I change my app's scope to drive the list of files appears. Why does it not work when the scope is set to drive.file? I created another project on Drive console and tested it but again it failed.

推荐答案

Drive.Files范围表示仅允许访问由应用程序打开或创建的文件.我相信新的API对文件范围的限制更大,因为Google试图推动开发人员使用新的 google文件选择器(作为一种安全措施),以访问未由应用创建的文件.

The Drive.Files scope states it only gives access to files opened or created by the app. The new API is more restrictive of file scope, I believe because Google is trying to push dev's to use the new google file picker (as a security measure), to get access to files not created by the app.

您的解决方案是:

  1. 使用Google文件选择器.
  2. 使用以前的api,并使用更广泛的范围.
  3. 与应用明确共享(@pinoyyid答案),例如通过创建应用程序拥有的帐户.
  1. use the Google file picker.
  2. use the previous api, and use a broader scope.
  3. share explicity with app (@pinoyyid answer), e.g. by creating an application owned account.

更新:我刚刚进行了测试,可以确认您的结果. 由应用程序创建"不是帐户之间共享的属性.它只会影响原始帐户.

Update: I just tested, and can confirm your results. "Created by application" is not an attribute shared between accounts. It only affects the original account.

这篇关于sharedWithMe不适用于drive.file范围的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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