Learn how to generate and configure Firebase Cloud Messaging (FCM) Service Account credentials for OneSignal to send Android push notifications to apps on the Google Play Store.
Page of Projects within Firebase
Go to Project Settings
Firebase gear icon submenu, showing Project Settings
Go to Cloud Messaging
Firebase Cloud Messaging API (V1) is disabled in this image. Ensure it is enabled for your project.
Enable Firebase Cloud Messaging API v1.
Return to Project Settings > Service Accounts
Service Accounts section within Firebase
Confirm and generate key
🔒 This file contains sensitive credentials. Do not share it or check it into version control.
Save the file
.json
file in a secure location. You will need it shortly.cloudmessaging.messages.create
firebase.projects.get
roles/firebasemessaging.admin
roles/firebase.viewer
Go to Android platform settings
Platforms screen within OneSignal app settings
Upload your credentials
.json
file under Service Account JSON by clicking Choose file.FCM configuration screen
Cloud Messaging > Sender ID
) with the one shown in your OneSignal settings.Save and continue
Choose your SDK
SDK selection screen
Add the OneSignal App ID to your code
Android configuration installation and testing screen
support@onesignal.com
with your App ID. Switching projects resets push tokens—your users must reopen the app to get push again.
support@onesignal.com
with your App ID for assistance.
AIz...
, you’re likely using an outdated Google Cloud Messaging (GCM) setup. Create a new Firebase project and upload a Service Account JSON file.
"gcm_key"
→ using Legacy, needs update"fcm_v1_service_account_json"
→ using V1 ✅