首页 > 解决方案 > Apps Script Web App 权限被自动撤销

问题描述

寻找有关以下问题的帮助/方向:

部署详解:

我有一个已作为 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"],

标签: google-apps-scriptweb-applications

解决方案


推荐阅读