Skip to main content

  1. Service Account Setup

Auxia uses a GCP service account to authenticate push notification API calls. Follow these steps:
  1. Get started using Firebase with an existing Google Cloud project.
  2. Create a service account in the linked GCP project.
  3. Assign the following role to the service account: Firebase Cloud Messaging API Admin Firebase cloud messaging
  4. Generate a JSON Key for this service account. JSON key
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.
The user_id to FCM token mapping should be shared with the Auxia team through User Attributes ingestion. Use the property fcm_token with the string_value field set for the property value.

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.
Auxia uses data-only messages (no 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: