在Gmail加载项中,此行:
var attachments = message.getAttachments();
失败并显示消息Access denied: : Not allowed for full access to mail message.
appscripts.json
清单文件包含:
"oauthScopes": [
"https://www.googleapis.com/auth/gmail.addons.execute",
"https://www.googleapis.com/auth/gmail.addons.current.message.metadata",
"https://www.googleapis.com/auth/gmail.addons.current.message.action",
"https://www.googleapis.com/auth/script.external_request",
"https://www.googleapis.com/auth/script.locale"
]
还需要什么?我还没有发现getAttachments
需要哪个范围。
答案 0 :(得分:0)
您可以加入此内容 " https://www.googleapis.com/auth/gmail.addons.current.message.readonly" 并删除这两个:
" https://www.googleapis.com/auth/gmail.addons.current.message.metadata&#34 ;, " https://www.googleapis.com/auth/gmail.addons.current.message.action"
这适合我。