firebase 错误消息/身份验证错误

Luk*_*uke 5 node.js firebase firebase-cloud-messaging

使用 firebase nodejs sdk 时,服务器密钥在哪里。

我收到错误消息/身份验证错误消息:“尝试向 FCM 服务器进行身份验证时发生错误。确保用于验证此 SDK 的凭据具有适当的权限。

但是我的 sdk 在处理身份验证时起作用,所以它肯定是初始化的,而不是用于消息传递。

小智 18

  1. 转到项目中的 GCP 控制面板;
  2. 搜索API and Service;
  3. 在该Enable APIs and Services部分中,单击+Enable APIs and Services,然后搜索cloud messaging
  4. 现在逐一进行Cloud Messaging并启用它。Firebase Cloud Messaging API