Skip to content

Commit a28798c

Browse files
Instructions for Server Key
Instructions currently stop at step `8` which instructs the users to copy and save the server key. However, server key can only be retrieved if `Cloud Messaging API (Legacy)` is enabled, as per instructions for [Legacy SDK](https://learn.microsoft.com/en-us/azure/notification-hubs/notification-hubs-android-push-notification-google-fcm-get-started). This change takes the instructions from the Legacy SDK and injects them here as well.
1 parent a0b7215 commit a28798c

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

articles/notification-hubs/android-sdk.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,16 @@ The first step is to create a project in Android Studio:
8282

8383
8. Copy and save the **Server key** for later use. You use this value to configure your hub.
8484

85+
9. If you do not see a **Server key** on the firebase Cloud Messaging tab, follow these additional steps.
86+
1. Click on the three-dots menu of the "Cloud Messaging API (Legacy) 🚫 Disabled" Heading
87+
2. Follow the offered link to "Manage API in Google Cloud Console".
88+
3. In google cloud console, press the button to enable the googlecloudmessaging API.
89+
3. Wait a few minutes.
90+
4. Go back to your firebase console project Cloud Messaging tab, and refresh the page.
91+
5. See that the Cloud Messaging API header has changed to "Cloud Messaging API (Legacy) ✅ Enabled" and now shows a Server Key.
92+
93+
![Screenshot showing the Enable Cloud Messaging API (Legacy) tab.](./media/notification-hubs-enable-firebase-cloud-messaging/notification-hubs-enable-firebase-cloud-messaging-legacy-api.png)
94+
8595
## Configure a notification hub
8696

8797
1. Sign in to the [Azure portal](https://portal.azure.com/).

0 commit comments

Comments
 (0)