# Push Notification

We provide 2 providers to send notification messages : **FCM** and **OneSignal**, FCM configuration is required and has been explained in the previous step by replacing google-services.json with yours, then OneSignal setup is optional.

### **FIREBASE CLOUD MESSAING (FCM)**

**Server Key**

Firebase provides Server API Key to identify your firebase app. To obtain your Server API Key, go to firebase console, select the project and go to settings, select Cloud Messaging tab and copy your Server key.

<div align="left"><img src="https://2174593329-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LfFZQw963gMCo-GG_aE%2F-MkqDu_Am66dfpDKSwg8%2F-Mkt17i8bKRVG07fvRfV%2Fimage.png?alt=media&#x26;token=c3296d21-5239-43b9-950d-4dbe2fa61c54" alt=""></div>

**FCM Notification Topic**

* In the latest updated version starting from version 4.3 or higher, notifications are received based on subscribed topics, so, the FCM token will not be stored in the database and no longer used.
* Notification topic name is determined by you, the notification topic must be written in lowercase without space (use underscore), e.g : your\_recipes\_app\_topic

Login to your Admin Panel, navigate to Settings menu and put your **FCM Server Key and FCM Notification Topic**.

<div align="left"><img src="https://2174593329-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LfFZQw963gMCo-GG_aE%2F-MkqDu_Am66dfpDKSwg8%2F-Mkt1Y510CxqhfQborVW%2Fimage.png?alt=media&#x26;token=5ce39f52-b8a1-4e33-beec-d60bbdac9f35" alt=""></div>



### **ONESIGNAL**

**Required For Setup**

* A [**OneSignal Account**](https://onesignal.com/), if you do not already have one
* Your OneSignal App ID, available in [**Keys & IDs**](https://documentation.onesignal.com/docs/accounts-and-keys#section-app-id)​
* ​[**A Google/Firebase Server API Key**](https://documentation.onesignal.com/docs/generate-a-google-server-api-key)​
* A device or emulator that has Google Play services installed and updated on it (Device will not subscribe or receive push notifications with out this).

**Keys & IDs Setup**

* Login to your OneSignal Account and select your app
* Select **SETTINGS > Keys & IDs** to get your OneSignal APP ID and REST API KEY
* Login to your Admin Panel, navigate to Settings menu and put your **OneSignal APP ID** and **OneSignal REST API KEY**.

<div align="left"><img src="https://2174593329-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LfFZQw963gMCo-GG_aE%2F-MkqDu_Am66dfpDKSwg8%2F-Mkt1sz78vMaBhQM_qWp%2Fimage.png?alt=media&#x26;token=8e91b56d-35bb-43a1-a4ef-f75c1c546fc4" alt=""></div>

<div align="left"><img src="https://2174593329-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LfFZQw963gMCo-GG_aE%2F-MkqDu_Am66dfpDKSwg8%2F-Mkt1pa_-4AR31SjL9Yp%2Fimage.png?alt=media&#x26;token=dbcbdbd7-c85d-48cc-93ad-a2495cd96a13" alt=""></div>
