2

I am working on an existing project from another developer and I need to get the GCM Server Key for PubNub settings since it was accidentally removed.

Is there any way I can retrieve it from Google settings? I can't find it in credentials and project settings.

I don't want to upgrade to Firebase for now.

AL.
  • 36,815
  • 10
  • 142
  • 281
JunM
  • 7,040
  • 7
  • 37
  • 58

2 Answers2

2

Google Cloud Messaging, register here by adding platform, you will get your API Key & Sender ID

Muhammad Faizan Uddin
  • 1,339
  • 12
  • 29
2

You don't have to actually upgrade to Firebase. You just have to migrate the project so that you can use the auto-generated Server Key in it. AFAIK, configurations should still the same after the migration of the project so there's no need to update any code.

This is the way it should be done in order to generate a new Server Key, as stated in the docs:

Starting from Sept. 2016 new server key can only be created in the Firebase Console using the Cloud Messaging tab of the Settings panel. Existing projects that need to create a new server key can be imported in the Firebase console without affecting their existing configuration.

If you ever decide to go with the project migration, see my answer here for the steps.

Community
  • 1
  • 1
AL.
  • 36,815
  • 10
  • 142
  • 281
  • This is what I am looking for, I will try it later. Thanks – JunM Nov 04 '16 at 12:47
  • @JunM Were you able to try it out? – AL. Nov 05 '16 at 11:33
  • @AL. I migrated to Firebase and a little while ago my existing GCM apps still worked. I only ever set up a browser key so that I could access the webpage on my server from any location. I now find that the old GCM apps now always give me a Not authorized 401 response. Is this to be expected? – NickT Nov 06 '16 at 15:40
  • @NickT When using FCM, you must always use the *Server Key* found in the *Cloud Messaging* Tab in your Firebase Console. – AL. Nov 06 '16 at 22:04