Mar*_*lva 1 node.js firebase firebase-cloud-messaging
我正在尝试在本地 firebase 服务器上运行一些 FCM 示例
firebase serve --only 功能,托管
但我收到授权错误
信息:发送消息时出错:{ 错误:尝试向 FCM 服务器进行身份验证时出错。确保用于验证此 SDK 的凭据具有适当的权限。有关设置说明,请参阅https://firebase.google.com/docs/admin/setup。原始服务器响应:
如何在本地运行 FCM 示例?
您需要确保以正确的方式设置了身份验证。Firestore 和实时触发器具有默认的身份验证设置,但对于包括 FCM 在内的其他 API,您需要授予访问权限。此处描述了这些步骤:https : //firebase.google.com/docs/functions/local-emulator
复制:
export GOOGLE_APPLICATION_CREDENTIALS="path/to/key.json"然后重试
firebase serve --only functions| 归档时间: |
|
| 查看次数: |
2793 次 |
| 最近记录: |