Last modified January 27, 2021 by Shelly Wolfe

How do I manage the Android server key for push notifications?

To enable an app to send push notifications to Google Play devices, you require a Firebase Cloud Messaging server key.

There are three main steps involved in creating a server key for your app and entering it in Swrve:

  1. Create or import a project in Google’s Firebase Developer Console and collect the Server key and Sender ID.
  2. Enter the Sender ID when initializing the Swrve SDK.
  3. Enter the server key on the Integration Settings screen in Swrve.

After you complete the required configuration, Swrve can send push notifications to your users on your behalf. For more information about managing push notifications in Swrve, see Intro to push notifications.

Creating a project

To create a project in the Firebase Console:

Step 1: In the Firebase Console, select Create New Project or Import Google Project, depending on your requirements.

Firebase new project

Step 2: Complete the create new or import project process.

Step 3: On the project navigation menu, select  Project settings, and then select Cloud Messaging. The Server key and Sender ID are displayed under the Project keys / credentials section.

GCM server key

Entering the server key in Swrve

Generally, you enter the server key in Swrve when configuring the Integration Settings screen as part of the Swrve onboarding process. You can edit the settings on this screen later on if required.

Step 1: On the Settings menu, select Integration settings.

Step 2: Under the Push Notifications section, in the Firebase Cloud Messaging Server Key section, enter your Server Key.

Step 3: Test the server key by sending a test push notification to one of your QA devices. To send a test push notification:

  • Select your QA device from the list of available devices.
  • Select Send Test Push.