【问题标题】:cordova-plugin-fcm ERROR : invalid api keycordova-plugin-fcm 错误:无效的 api 密钥
【发布时间】:2017-02-11 09:15:58
【问题描述】:

我正在使用cordova-plugin-fcm。我已按照安装说明进行操作:

  1. 安装插件
  2. google-services.json 添加到我的根文件夹

我想通过他们的testing server 测试它,但我得到了错误:

ERROR: invalid api key 

我插入的密钥是条目中文件google-service.json中的那个:

"api_key": [{"current_key": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}]

如何正确进行测试?

【问题讨论】:

  • 与您的 Firebase 控制台中看到的服务器密钥相同吗?
  • 它与服务器密钥不同。我把它改成了现在的服务器密钥,它正在工作

标签: cordova firebase push-notification cordova-plugins firebase-cloud-messaging


【解决方案1】:

使用 FCM 时,您应该始终使用在 Firebase Console 的云消息选项卡中看到的服务器密钥。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-10-13
    • 1970-01-01
    • 1970-01-01
    • 2022-09-30
    • 1970-01-01
    • 2019-04-30
    • 1970-01-01
    相关资源
    最近更新 更多