Hi,
I am not able to create a notifier for Android. It is failing with the following error message:
"Invalid GCM API Key or Registration ID(s)"
Here is what I have done:
Registering with Google Notification Service
1. Created a new project in Google developer console.
2. Enabled Google Cloud Messaging
3. Created new credentials
Note: The key is an API Key. That seems to be the only option for Google Cloud Messaging. I was not able to create a "Server key" as per the documentation here. I believe the documentation is now outdated.
Creating Notifiers with admin portal
I have followed the steps here (Apigee's documentation), but it fails in step 6.
I am picking up the key as per the instructions in step 5. I have tried regenerating the key as well.
Please help.
Regards,
Ritwik
If you are using GCM to generate the API key, it will not work.
FCM is the new version of GCM and google recommends using FCM.
Any chance you are using FCM and getting this error?
@Gagandeep Singh - I looked at FCM documentation. Looks like FCM supports OAuthv2. I am trying to use Apigee BaaS for GCM communication. Not sure if Apigee BaaS has already switched to FCM. Atleast the Apigee documentation does not show that.
Answer by Ritwik Chatterjee · Nov 21, 2017 at 06:59 PM
I finally figured out the solution.
The apigee documentation is obsolete now, and so is the GCM process. The API key generated by the above approach is not accepted by GCM themselves :)
Here is a small snippet that I found on GCM documentation:
"Starting from September 2016, you can create new server keys only 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 theFirebase console without affecting their existing configuration."
You should follow this approach - import your GCM project in FCM and generate a key from there. That key can be used.
Thanks for those who tried to help.
Regards,
Ritwik
Huge apologies for the stale docs, @Ritwik Chatterjee. I'm glad you found the answer. I've removed the steps in that topic but kept the link to the correct content you referenced. Thanks!