cordova-plugin-fcm错误:无效的api密钥

Med*_*umy 5 push-notification cordova firebase cordova-plugins firebase-cloud-messaging

我正在使用cordova-plugin-fcm.我遵循了安装说明:

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

我想通过他们的测试服务器测试它,但我得到错误:

ERROR: invalid api key 
Run Code Online (Sandbox Code Playgroud)

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

"api_key": [{"current_key": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}]
Run Code Online (Sandbox Code Playgroud)

我该如何正确进行测试?

AL.*_*AL. 10

使用FCM时,应始终使用Firebase控制台中 Cloud Messaging选项卡中显示的服务器密钥.