Google API Key and Sender ID for Web Push Notifications


Posted on Apr 17th, 2016


Google Cloud Messaging (GCM) is a free service that enables developers to send messages between servers and client apps. This includes downstream messages from servers to client apps, and upstream messages from client apps to servers.

To be able to send push notifications, you will have to register a project with Google Developers Console. Here are steps to get GCM Sender Id and GCM API Key. 

Step1: Go to this link and click on new project. This will open up a popup window.

Give a name of your project and click Create.

Step 2: Next, it will automatically open the API Manager for you. Search for Google Cloud Messaging and then click on it.

Enable it.

Step 3: It will ask you to create credentials. Click on that. 

On the second dropdown, it will ask you Where will you be calling the API from?

Step 5: Select Web Browser and click on What credentials do I Need.

Step 6: Click on create API Key.

Your API Key credentials will be displayed. Copy that key and save it somewhere.

Step 7: To get the GCM Sender Id, visit this link

Click on the project that you created.

 

Here you will find Project Number which is also the Sender Id.

 

 


Tutorial - Restful API service in PHPWeb Push Notification with Service Worker

Comments


  • Apr 19, 2016, 12:13 PMStefan
    Very helpful. Thanks.
100% Complete