Google apps script 由于缺少显式作用域,无法发布Google日历加载项-但为什么?
我试图发布我的Google插件,但收到以下错误: 也就是说,为了发布,需要一个OAuthScope的显式列表 这是我的appscript.json的oauthscope部分:Google apps script 由于缺少显式作用域,无法发布Google日历加载项-但为什么?,google-apps-script,google-cloud-platform,google-oauth,add-on,Google Apps Script,Google Cloud Platform,Google Oauth,Add On,我试图发布我的Google插件,但收到以下错误: 也就是说,为了发布,需要一个OAuthScope的显式列表 这是我的appscript.json的oauthscope部分: "oauthScopes": [ "https://www.googleapis.com/auth/script.locale", "https://www.googleapis.com/auth/calendar.addons.execute", "
"oauthScopes": [
"https://www.googleapis.com/auth/script.locale",
"https://www.googleapis.com/auth/calendar.addons.execute",
"https://www.googleapis.com/auth/calendar",
"https://www.googleapis.com/auth/script.external_request",
"https://www.googleapis.com/auth/userinfo.email",
"https://www.googleapis.com/auth/script.scriptapp",
"https://www.googleapis.com/auth/admin.directory.user.readonly",
"https://www.googleapis.com/auth/admin.directory.group.member.readonly",
"https://www.googleapis.com/auth/userinfo.profile",
"https://www.googleapis.com/auth/gmail.send",
"https://www.googleapis.com/auth/script.send_mail"
],
我还在“ProjectOAuthScropes”下签入了AppScript项目->概述。这里有完全相同的范围
我还在相应的GCP项目的OAuth同意屏幕中添加了完全相同的范围
我还能做什么
[编辑]
因此,在我再次检查AppScript项目概述中的作用域之后,由于某些原因,现在出现了不同的作用域。特别是自动添加了一个范围,这可能是问题所在:
https://mail.google.com/
可能是源代码被扫描了,而这个作用域被自动添加了吗?那我怎么发布呢?我发现问题出在这个范围
https://mail.google.com/
已自动添加。原因是我在代码中有下面这行代码实际上已经不再使用了:
GmailApp.getThreadById(event.threadId)代码>
所以我删除了它,它成功了。我发现问题出在这个范围https://mail.google.com/
已自动添加。原因是我在代码中有下面这行代码实际上已经不再使用了:
GmailApp.getThreadById(event.threadId)代码>
所以我把它取下来,它就起作用了