google-apps-script - 如何清除“例外:您无权调用...”?
问题描述
我正在打开一个包含 Google Apps 脚本的 Google 表格文档,而不是插件。一些脚本代码会在文档打开时自动运行,并且需要各种权限。最近我收到一条错误消息,具体取决于每个功能所需的权限,例如:
例外:您无权调用 UrlFetchApp.fetch。所需权限:https ://www.googleapis.com/auth/script.external_request
为了解决这个问题,我将脚本概述页面中列为“Project OAuth Scopes”的五个脚本添加到了 appsscript.json:
{
...
"oauthScopes": [
"https://www.googleapis.com/auth/script.send_mail",
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/script.external_request",
"https://www.googleapis.com/auth/script.container.ui",
"https://www.googleapis.com/auth/spreadsheets"
],
...
这并没有什么不同。
如何让 Google 相信我要为文档及其包含的脚本授权这些权限?是否有一种方法可以强制进行授权对话,例如在我开始编码时遇到我?谢谢!
解决方案
推荐阅读
- memory - ESP32:经常通过 BLE 存储和发送数据
- r - polr 的预测值仅生成一小部分响应值
- c - Make-File:将多个 SRC 文件夹编译为单个 OBJ 文件夹
- java - 无法使用 Flutter_bluetooth_serial 包连接到设备
- javascript - 谷歌分析中我网站的查询字符串中的恶意 javascript 代码
- javascript - Js中的if()语句
- electron - 电子 nativeImage.createFromNamedImage 低分辨率
- javascript - 使用 map 从包含项目数组的对象中获取项目
- mongodb - 使用官方 mongodb golang 包调试查询(命令监控)
- python - 减去字符串中的数字