FCM Configuration for Nabto Edge Push Notifications
This guide shows you how to create and configure a Firebase project to send Firebase Cloud Messaging (FCM) notifications through Nabto Edge. This guide assumes you have a Google account (eg. one used for Gmail) and are logged in.
Step 1: Creating a Firebase project
Go to the Firebase Console, click
Add project, enter a suitable project name, and continue. The wizard will ask if Google Analytics should be enabled for the project. This is not needed by Nabto and can be disabled, or you can enable it if you want.
Step 2: Give Nabto access to the project
For the Nabto Edge Basestation to send push notification through your Firebase project, you must give the Nabto service account permission to do so.
- Go to the Google Cloud Console and select the Firebase project created in Step 1.
- From the navigation menu, go to the
IAM & Adminpage.
- Add the Nabto Edge Push service account:
firstname.lastname@example.org a member with the role
Firebase SDK Provisioning Service Agent
Note: To keep this guide as simple as possible, it uses the most restrictive standard GCP role which allows Nabto to send FCM notifications to your project. If you create your own custom role, the Nabto Edge Push service account only requires the permission
Step 3: Enable the Firebase Cloud Messaging API
From the Google Cloud Console navigation menu, go to the
APIs & Services page, click
ENABLE APIS AND SERVICES. Find and enter the
Firebase Cloud Messaging API. If it is not already, enable this API.
Your Firebase project should now be fully configured and ready to use with Nabto Edge. To actually use it, you need a mobile app which integrates with Firebase. To quickly try sending push notifications, the get-started guide shows how to modify the Nabto provided example to use your own Firebase project.
To integrate push notifications into your own App, Firebase provides detailed guides for integrating Firebase into your app for Android and iOS. Once your app integrates with Firebase, use the Nabto APIs to start sending push notifications.