本文介绍了Google drive api:copy error with scope“drive.file”和“drive.readonly”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我的问题是,如果你只有范围drive.file和drive.readonly,无法将文件从驱动器中的一个文件夹复制到驱动器中的另一个文件夹与谷歌驱动器api? p> 使用API资源管理器测试: https://developers.google.com/drive/v2/reference/files/copy 错误是:已通过身份验证的用户尚未向应用X授予对文件Y的写访问权限。 但是可以创建一个文件(使用相同的范围)并复制。解决方案 这是可能的,但你还需要 >drive.metadata作用域。您可以使用驱动器作用域,但提供的访问权限比所需的更多。 My question is if it is not possible to copy a file from one folder in drive to another folder in drive with the google drive api if you only have the scopes "drive.file" and "drive.readonly"?Tested using the API explorer: https://developers.google.com/drive/v2/reference/files/copyThe error is: "The authenticated user has not granted the app X write access to the file Y".Creating a file (using the same scopes) and copying it is possible however. 解决方案 Figured I ask and put the answer up since it's hard to find info about the google drive api.It is possible but you also need the "drive.metadata" scope for it to work. You can ofc use the "drive" scope but that provides more access than needed. 这篇关于Google drive api:copy error with scope“drive.file”和“drive.readonly”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!