Christy Jacob

Push notifications with FCM

Firebase Cloud Messaging (FCM) is a cross-platform messaging solution from Google that enables you to send notifications and messages to users across Android, iOS, and web applications. It supports both notification messages displayed by the system UI and data messages handled by your app’s code.

How does the integration work?

You can use the FCM provider in Appwrite Messaging to send push notifications to your users’ iOS, Android, and web apps. These can be used to send app updates, special offers, instant notifications, reminders, and more.

How to implement

To implement the FCM provider in Appwrite Messaging, there are several steps you must complete:

Step 1: Sign up on Firebase

First, you must sign up for a Firebase account and create a new project. Head to the Project settings page, click on the Service accounts tab, and generate new private key. Download the JSON file for later use.

Firebase service account private key

You must also verify that FCM has been enabled on your project by visiting the Cloud Messaging tab. If FCM is disabled, click the three-dots menu, open the link, and click Enable.

Step 2: Add FCM provider to your Appwrite project

For this step, you must create an account on Appwrite Cloud or self-host Appwrite if you haven’t already. In your Appwrite project, head over to the Messaging page, click on the Providers tab, and create a new push notifications provider.

Select FCM and upload the JSON file you downloaded from Firebase.

FCM provider

Step 3: Test the provider

To test the provider on mobile apps, there are some additional configuration steps:

    After that, you can follow the Send push notifications flow to test your provider.

    Read more about FCM and Appwrite Messaging

    If you would like to learn more about FCM and Appwrite Messaging, we have some resources that you should visit:

    Become a Technology Partner

    Join our Technology Partners program to integrate your solutions with Appwrite’s API, enhancing functionality and expanding your reach.

    Get Started