google-apps-script - Google Script Add-on 需要访问未使用的范围
问题描述
我已经使用谷歌应用程序脚本为谷歌电子表格构建了一个插件,但我无法弄清楚它为什么要求云端硬盘权限。未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"
]
解决方案
似乎我driveapp
在 G Suite Marketplace 配置中添加了范围,并且 OAuth 屏幕在删除该范围后不再要求驱动器权限。“未验证”应用消息也不再显示。
推荐阅读
- python - 如何从文件中解压值
- php - 无法将 .GLB 上传到 Wordpress 媒体位置
- python - Tkinter GUI 使用 cx-freeze 显示为黑色
- angular - angular 6 - 订阅内的 defaultValue formGroup
- r - R中合并期间丢失的行
- javascript - Javascript:按数组索引号列表过滤数组
- sql - 左连接后计算总数并要求 0 用于 NULL 变量 - SQL Server
- html - 我们可以为 Squarespace 网站的一个页面手动定义所有 HTML,并将其 UI 用于其他页面吗?
- reactjs - 从前端发布数据时遇到 CORS 问题(React)
- c++ - 在声明中合并两个常量 `std::set`s(不在运行时)