Is the https://www.googleapis.com/auth/drive.file enough to create and update files or is the scope /drive needed?

大兔子大兔子 提交于 2020-12-14 04:21:33

问题


Currently we only have the scope https://www.googleapis.com/auth/drive.readonly but we want to be able to write and update files to google drive as well. Reading the documentation they state that https://www.googleapis.com/auth/drive.file is enough to create and update files. But before we apply to this I want to make sure this scope is enough.


回答1:


As written in the Documentation https://www.googleapis.com/auth/drive.file will only allow you access to files created or opened by the app(you).

https://www.googleapis.com/auth/drive allows you to access all of a user's files, excluding the Application Data folder.

So if you want to access all the user files https://www.googleapis.com/auth/drive else https://www.googleapis.com/auth/drive.file is enough to create and update the files.



来源:https://stackoverflow.com/questions/56344368/is-the-https-www-googleapis-com-auth-drive-file-enough-to-create-and-update-fi

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!