【问题标题】:GCP - The caller does not have a permissionGCP - 调用者没有权限
【发布时间】:2020-09-14 00:44:21
【问题描述】:

我想将 Google 云消息传递和通知添加到我的服务器。

我已将以下角色添加到我的服务帐户,但我仍然无法从我的服务器发送消息。

Firebase Cloud Messaging Admin

我再深入一点,发现我们需要获得许可才能使其工作。

cloudmessaging.messages.create

此权限在默认的所有访问帐户中都可用,但如果我创建具有特定访问权限的新服务帐户,我无法在任何地方找到此权限。

请大家帮忙!

【问题讨论】:

  • 页面列出了拥有cloudmessaging.messages.createcloud.google.com/iam/docs/permissions-change-log权限的角色,你说的服务器是什么意思?权限 cloudmessaging.messages.create 是 Firebase 权限。
  • 嗨@JohnHanley 感谢您的回复,我在后端使用 Firebase Admin SDK 进行一些 api 调用。现在为了进行身份验证,我创建了一个服务帐户,该服务帐户需要在 IAM 页面中设置此权限,以便使用此服务帐户我可以发送云消息或通知。
  • 选择我提供的链接中提到的角色之一。
  • 是的,我添加了云消息传递角色,但它没有添加此特定权限。
  • 该角色没有该权限。返回并阅读文档。

标签: google-cloud-platform firebase-cloud-messaging firebase-notifications


【解决方案1】:

为了获得“cloudmessaging.messages.create”权限,请尝试使用以下角色之一:

    roles/firebase.admin

    roles/firebase.growthAdmin

社区通过public documentation 确定,云消息传递角色不包含这种情况下所需的权限。

【讨论】:

    【解决方案2】:

    cloudmessaging.messages.create 受以下角色支持

    1. Firebase 管理员
    2. Firebase 增长管理员
    3. Firebase Admin SDK 管理员服务代理
    4. Firebase SDK 配置服务代理

    你可以查看以下页面的角色。 Understanding Roles

    【讨论】:

      猜你喜欢
      • 2019-08-08
      • 1970-01-01
      • 2017-04-04
      • 2019-08-06
      • 2020-02-26
      • 2019-05-15
      • 2022-07-05
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多