Create a Firebase project

1. Go to the Firebase Console page:
Note: you need to be logged in to your Google account to access this page. If you don’t have a Google Account, you need to create one to continue this process.
2. Click "Add project":


An iBox called Create a project opens.
3. Name your project
4. Click "Continue" then enable or not Google Analytics
5. Click "Create project"


Firebase project settings

1. In the Firebase menu, at the top left of the page, click the gear icon > "Project settings”:


2. Click the tab Cloud Messaging
3. Copy the Sender ID. In our example below, it's 839819466506.
4. Open your back office in a new tab.



Paste your Sender ID in your back office

1. In your back office, go to the menu Publish > PWA > Push Certificates
2. Paste your Sender ID in the corresponding field
3. Click Next Step.


Back to Firebase console

1. In the Firebase console, go to the menu Project settings > Tab “Cloud Messaging”
2. Click the 3 dots next to Cloud Messaging API (Legacy) then click "Manage API in Google Cloud Console"


3. Click "Enable" under Cloud Messaging in the new tab that was opened.
4. Go back to Firebase tab and reload your page
5. Copy the Token under Cloud Messaging API (Legacy)



Back to your back office

1. Go to the menu Publish > PWA > Push Certificates  
2. Paste the server key you copied at step 4.5 above
3. Click "Next step"



Rebuild your PWA

1. Go to the menu Publish > PWA > Update > Progressive Web App Engine
2. Click "Rebuild my PWA" to integrate your server key to your app.

Once PWA regenerated, you'll be able to send push for your PWA users.

More articles