1

Does anybody know where to get the API Key mentioned in this documentation when using Firebase Cloud Messaging (FCM)?

enter image description here

Google Cloud Messaging (GCM) has been replaced by FCM, and I'm not sure where to find the required API key.

I managed to send push notification directly from Firebase project to my app, but when I try to send test notification from my Connected App inside Salesforce I get an error message, probably due to incorrect API Key.

1

Navigate to https://console.firebase.google.com

You can find the Server Key and associated Sender ID in:

(gear-next-to-project-name) > Project Settings > Cloud Messaging

  • Thank you very much, this got me out of status quo finally. I copied the Server Key and tried to send the test notification again, and this time I got a new error message that I haven't seen before: Recipient field contains registration ID that is not valid for the connected application's key for server applications (API key) (GCM error code: MismatchSenderId). Any chance you might know what's the issue? – smukov Sep 15 '16 at 16:03
  • When the registration call is made by our SDK it will return your SystemToken (search LogCat). That is the token that you need to use. Programmatically you can get it with the getSystemToken() convenience method and it will also be output from the getSdkState() method. – Bill Mote Sep 15 '16 at 20:44
  • 1
    Thanks. I had to set the androidPushNotificationClientId in my bootconfig.json to Sender ID from Firebase. Now everything works perfectly. – smukov Sep 16 '16 at 6:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.