【发布时间】:2021-09-11 03:11:43
【问题描述】:
我正在使用 Bamboo 使我的网站访问者能够填写并发送联系表。
- 我创建了一个服务帐号
- 我授予它域范围的权限
- 我添加了以下范围: https://www.googleapis.com/auth/gmail.addons.current.action.compose https://www.googleapis.com/auth/gmail.addons.current.message.metadatahttps://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/script.locale https://mail.google.com/ https://www.googleapis.com/auth/gmail.modify https://www.googleapis.com/auth/gmail.compose https://www.googleapis.com/auth/gmail.send https://www.googleapis.com/auth/gmail.addons.execute https://www.googleapis.com/auth/script.send_mail https://www.googleapis.com/auth/gmail.settings.basic
配置
config :fajalobi, Fajalobi.Mailer,
adapter: Bamboo.GmailAdapter,
sub: "****.iam.gserviceaccount.com",
sandbox: false
# Google auth credentials must be provided to the `goth` app
config :goth, json: "priv/keys/****.json" |> File.read!
服务返回
Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.
有人建议吗?
【问题讨论】:
标签: elixir gmail-api google-developers-console