1

在 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.

4

1 回答 1

1

您可以包含此“ https://www.googleapis.com/auth/gmail.addons.current.message.readonly ”并删除以下两个:

https://www.googleapis.com/auth/gmail.addons.current.message.metadata ”、“ https://www.googleapis.com/auth/gmail.addons.current.message.action

这对我有用。

于 2018-04-23T14:19:04.863 回答