我有一个OnSubmit()
方法,该方法在表单提交时被调用。我时不时地收到一封电子邮件,报告未提供所需的权限:
您的脚本“ Alohi邀请请求”最近未能成功完成。故障摘要如下所示。要配置此脚本的触发器,或更改您的设置以接收将来的故障通知,请单击此处。
12/22/18 10:47 AM onSubmit You do not have permission to call FormApp.getActiveForm. Required permissions: (https://www.googleapis.com/auth/forms.currentonly || https://www.googleapis.com/auth/forms) formSubmit
我已经向appsscript.json
添加了权限:
{
"timeZone": "A-SAMPLE-TIMEZONE",
"dependencies": {
},
"exceptionLogging": "STACKDRIVER",
"oauthScopes": [
"https://www.googleapis.com/auth/forms",
"https://www.googleapis.com/auth/userinfo.email",
"https://www.googleapis.com/auth/script.external_request"
]
}
在这里,我提供了forms
的权限,但是Google
抱怨该权限。为什么会这样?
EDIT-1:
表单项目可以访问以下内容:
EDIT-2:
看来是个错误,所以我在Google
问题跟踪工具中提出了一个问题: