google-apps-script - Apps Script Web App 权限被自动撤销
问题描述
寻找有关以下问题的帮助/方向:
- 应用程序脚本 Web 应用程序经常丢失权限。
部署详解:
我有一个已作为 Web 应用程序发布的 GAS Web 应用程序,它正在“以我的身份执行”。
我还创建了一个版本,然后在这个特定版本上发布脚本。脚本还有一些时间驱动的触发器,这些触发器也在特定的发布版本上设置。
根据 Google Apps Script Documentation,以上是将 Apps Script 项目部署为 Web App 的最佳实践。
但是最近,即使脚本没有变化,这个 GAS/Web 应用程序也会自动失去权限。所以最终,脚本触发器开始抛出错误:“需要授权才能执行该操作”。
有什么我想念的吗?
仅供参考,以下是我的脚本所需的权限:
"oauthScopes": ["https://www.googleapis.com/auth/spreadsheets.readonly",
"https://www.googleapis.com/auth/userinfo.email",
"https://www.googleapis.com/auth/spreadsheets.currentonly",
"https://www.googleapis.com/auth/spreadsheets",
"https://www.googleapis.com/auth/gmail.readonly",
"https://www.googleapis.com/auth/gmail.modify",
"https://mail.google.com/",
"https://www.googleapis.com/auth/script.scriptapp",
"https://www.googleapis.com/auth/script.container.ui",
"https://www.googleapis.com/auth/forms",
"https://www.googleapis.com/auth/drive.readonly",
"https://www.googleapis.com/auth/drive"],
解决方案
推荐阅读
- database - 无法通过 VPN 连接到数据库 - 一直超时
- javascript - 如何在子窗口中检测 location.hostname?
- css - Bootstrap 两侧的不同填充
- python - 如何将 Blender bge 模块作为 bge.py?
- ios - 核心数据启动错误 Domain=NSCocoaErrorDomain Code=134140 "(null)"
- java - 在 Java 中为 Actor System 设置默认的 ExecutionContext
- i2c - SPI和I2C读/写访问的区别
- javascript - 添加两个值时的JavaScript NaN
- laravel - 在 laravel 中发出 POST 请求
- alexa - 使用 node.js 的 Alexa 技能中的用户输入不调用意图