How to get API Key for GCM (Google Cloud Messaging)

As Developer android if we want to implement GCM push notification we need to obtain GOOGLE API key for GCM. here brief tutorial :

1. Go to https://console.developers.google.com/

Make sure you already enabled GCM api, (because google direct to FCM when you manually enable from api list) you can try to search “GCM” at search field like this,  and enable it :

capture

2. Create Project –> Give project name , ie: “GCM Material Recipe”

1

 

————————————————————————————————————————————————————————————

The New way to get Project Number or PROJECT_NUMBER_ID is Select the Project at top-right drop down, and Select Project Information

2222

4. In the dialog will display your PROJECT_NUMBER_ID or Project Number this is will be used on android

42222

 

[IMPORTANT ] Obtain Server API_KEY :

These API KEY from console.developers.google.com will no longer work. You need to go to console.firebase.google.com and import your existing GCM project.

capture

capture

Then go to Project Settings -> Cloud Messaging, and get the new updated API Key. The “Sender Id” should be exactly the same number as your existing “GCM Project Number“.

capture

OK Finish All you need for implement GCM is here :

PROJECT_NUMBER_ID or Project Number : 239973….
GOOGLE_API (server) : AIzaSyAf8YTqLUtOQcr7l7n5g4……..

 

Leave a Reply

Your email address will not be published. Required fields are marked *