我使用谷歌应用程序脚本为谷歌电子表格创建了一个插件,但我不明白为什么它会要求驱动器权限。Drive API
没有启用,我没有在项目中的任何地方使用DriveApp
类,driveapp
作用域也没有在任何地方定义,但它显示在OAuth授权屏幕上,并使应用程序未经验证:
以下是项目属性中的范围:
appscript.json
文件中定义的作用域:
"oauthScopes": [
"https://www.googleapis.com/auth/analytics.edit",
"https://www.googleapis.com/auth/analytics.readonly",
"https://www.googleapis.com/auth/script.container.ui",
"https://www.googleapis.com/auth/script.external_request",
"https://www.googleapis.com/auth/script.scriptapp",
"https://www.googleapis.com/auth/script.send_mail",
"https://www.googleapis.com/auth/spreadsheets",
"https://www.googleapis.com/auth/userinfo.email"
]
最后,在谷歌云平台中授权的范围,OAuth同意屏幕:
发布于 2019-12-13 09:26:32
正如在Google Sheets的documentation中所写的,如果您不使用公共数据,那么您只需要很少的驱动器授权就可以使用接口。
https://www.googleapis.com/auth/drive.file
https://www.googleapis.com/auth/drive (仅在绝对必要时才请求此作用域。)
发布于 2019-12-20 08:10:23
似乎我已经在G套件市场配置中添加了driveapp
作用域,删除该作用域后,OAuth屏幕不再询问驱动器权限。“未验证”的应用程序消息也不再显示。
https://stackoverflow.com/questions/59319050
复制相似问题