This guide is for developers integrating OneSignal with an Android mobile app distributed via the Google Play Store.
- This guide should not be used for Web Push. See Web push setup.
- For Huawei apps distributed via the Huawei App Gallery, see Huawei: Authorizing OneSignal.
Requirements
- An Android app distributed via the Google Play Store
- A Firebase account (free)
- A OneSignal account
Setup
1. Create or open your Firebase Project
Go to the Firebase console.- If you don’t have a project yet, click Add project and complete the setup.
- If you already have a project, select it.

2. Enable Firebase Cloud Messaging API v1
1
Go to Project Settings
In Firebase, click the gear icon next to Project Overview > Project settings.

2
Go to Cloud Messaging
Go to the Cloud Messaging tab.If Firebase Cloud Messaging API (V1) is disabled, click the 3-dot menu > Open in Cloud Console.
In the Google Cloud Console, click Enable. Wait a few minutes for the change to reflect in Firebase.


3. Generate a Service Account JSON file
1
Return to Project Settings > Service Accounts
At the bottom, click Generate new private key.

2
Confirm and generate key
Confirm by clicking Generate key in the popup.

3
Save the file
Save the
.json file in a secure location. You will need it shortly.Required Service Account permissions:
cloudmessaging.messages.createfirebase.projects.get
roles/firebasemessaging.adminroles/firebase.viewer
4. Upload your credentials to OneSignal
1
Go to Android platform settings
In your OneSignal dashboard, go to: Settings > Push & In-App > Push Platforms > Google Android (FCM).Click Activate.

2
Upload your credentials
Upload the 
.json file under Service Account JSON by clicking Choose file.
3
Save and continue
4
Choose your SDK
Select the SDK you are using and click Save & Continue.

5
Add the OneSignal App ID to your code
Continue following the Mobile SDK setup and add this OneSignal App ID to your code.

You’ve successfully connected your OneSignal app to Firebase Cloud Messaging (V1).Next, complete Mobile SDK setup or go to Mobile push setup for platform-specific instructions.
FAQ
Error: “This configuration is for a different Firebase Project…”
This error occurs when the uploaded JSON file belongs to a different Firebase project (i.e., different Sender ID). Solution: Use the original Firebase project’s JSON file. If unavailable, contact[email protected] with your App ID. Switching projects resets push tokens—your users must reopen the app to get push again.
Can I change my Sender ID?
No. The Sender ID is locked once your app surpasses 100 Android users to prevent accidental invalidation of push tokens. If necessary, contact[email protected] with your App ID for assistance.
Do I need to update my code when switching to FCM V1?
No app or SDK changes are required—this is a dashboard-only update.What is the deadline for switching to FCM v1?
Google began deprecating legacy FCM APIs in July 2024. Migration is strongly recommended. See Google’s announcement.Why don’t I see a Sender ID in OneSignal?
If your Firebase server key looks likeAIz..., you’re likely using an outdated Google Cloud Messaging (GCM) setup. Create a new Firebase project and upload a Service Account JSON file.
How can I check which apps are still using the Legacy API?
Use the View apps API and check for:"gcm_key"→ using Legacy, needs update"fcm_v1_service_account_json"→ using V1 ✅- Neither → app does not use Android push