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.
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.