Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

cordova-plugin-fcm ERROR : invalid api key

I am using cordova-plugin-fcm. I have followed the installation instruction:

  1. install plugin
  2. add the google-services.json to my root folder

I wanted to test it through their testing server, but I get the error:

ERROR: invalid api key 

The key I inserted was the one from the file google-service.json in the entry:

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

How can I do the testing properly?

like image 308
Med Tumy Avatar asked Oct 03 '16 12:10

Med Tumy


1 Answers

When using FCM, you should always make use of the Server Key seen in the Cloud Messaging Tab in your Firebase Console.

like image 161
AL. Avatar answered Oct 13 '22 21:10

AL.