Sample code for chrome push notifications.
Click here to create your project.
Import your recently created project to the firebase google console.
Click here to open the console where you should be able to get your api key.
Replace the URL so it looks like this https://console.firebase.google.com/project/NAME_OF_YOUR_PROJECT/settings/cloudmessaging/?hl=en
The api_key
is named Server key
(which is the longer one) and the sender_id
is named Sender ID
, easy peasy lemon squeezy.
Just create your account and grab the generated API key.
Copy the file env.example.json
renaming it to env.json
. Replace the fields gcm_sender_id
, google_news_api_key
and api_key
with the information found on the previous steps.
Click the image below.