- Service Account Setup
Auxia uses a GCP service account to authenticate push notification API calls.
Follow these steps:
- Get started using Firebase with an existing Google Cloud project.
- Create a service account in the linked GCP project.
-
Assign the following role to the service account:
Firebase Cloud Messaging API Admin

-
Generate a JSON Key for this service account.

Share this service account JSON key with the Auxia team.
2. FCM Token
The FCM token is a unique identifier for a device registered with Firebase Cloud Messaging (FCM). This token is required to send push notifications to a device. Lifecycle:- Use
getToken()to generate the token. - Monitor for token refresh events.
Ensure your application updates the user_id to FCM token mapping on your backend. This ensures push notifications are delivered to the correct users.For a sample implementation, see the Sample Flutter Set up section.
3. Delivery Details
Pre-requisites:- FCM token is used to identify a particular user.
- Service account JSON Key is used for authentication.
- On the server, the JSON key is used to retrieve a short-lived OAuth 2.0 access token.
- The access token is used in the send-message API with the FCM token as the user identifier.
notification object). All fields — including title, body, and image — are sent as key-value pairs in the data object. This ensures compatibility across both Android and iOS.
Example payload: