- An FCM Service Account private key, uploaded to OneSignal. This authorizes OneSignal’s servers to send to your Firebase project. Required.
- A
google-services.jsonfile, added to your app. This is Firebase client configuration that ships inside your app. Recommended for all new integrations, and required for Firebase Installation ID registration.
- Web Push. Android devices can subscribe to your website or PWA without an FCM Service Account. See Web push setup.
- Huawei devices without Google Play services. See Huawei Authorization.
- Amazon devices (Fire OS). See Amazon API key generation.
Requirements
- An Android app that runs on devices with Google Play services, including Google Play, sideloaded, and internal builds
- A OneSignal account
- A Firebase account (free)
Create a Firebase Service Account private key
Create or open your Firebase Project

Page of Projects within Firebase
Enable Firebase Cloud Messaging API V1

Cloud Messaging tab in Firebase Project settings
- Enabled (green checkmark) means Google accepts Cloud Messaging send requests for this project.
- Disabled means Google rejects those requests, so Android push notifications do not deliver. Enable this by clicking the 3-dot menu > Manage API in Google Cloud Console, then click Enable and wait until the status shows API Enabled with a green checkmark.

Firebase Cloud Messaging API enabled in the Google Cloud Console
Generate a new private key

Service Accounts section within Firebase

Generate the private key for the service account.
.json file in a secure location. You upload it to OneSignal in the next section.Upload the Service Account private key to OneSignal
Upload the private key so OneSignal’s servers can send push notifications through your Firebase project.Open Android settings
Upload your Service Account private key
.json private key you saved in the previous section.
FCM configuration screen
Save and continue
Add your Firebase configuration file
Your app needs agoogle-services.json file from the same Firebase project as your Service Account above. Do not upload this file to OneSignal. It belongs in your app’s source code and tells your app which Firebase project to register with.
On OneSignal Android SDK 5.11.0 and later, the SDK registers through your Firebase project when your google-services.json matches the Sender ID in OneSignal. Otherwise the SDK uses OneSignal’s shared Firebase project. See What happens if I skip google-services.json?
Download google-services.json
applicationId, then download google-services.json.Add it to your app
Apply the Google Services Gradle plugin
google() is listed under pluginManagement in settings.gradle or settings.gradle.kts, or the build fails with Plugin [id: 'com.google.gms.google-services'] was not found:Verify the file took effect
Build your app, then confirm the plugin generated Firebase’s string resources:google_app_id and project_id appear, the file took effect. A successful build alone does not prove it.- Neither value appears: the plugin is not applied. Adding the file without the plugin produces no error.
File google-services.json is missing: the plugin is applied, but the file is not where your toolchain expects it. Check the table above.No matching client found for package name: the package registered in Firebase does not match yourapplicationId. Fix it in the Firebase console and download the file again.- The file comes from a different Firebase project than your Service Account: see Match your Firebase projects.
Set up Firebase without google-services.json
Initialize the defaultFirebaseApp in code if you can’t use the Google Services Gradle plugin, or if you load Firebase only after user consent. Use values from the same Firebase project as the Service Account private key you uploaded to OneSignal:
- On the legacy token path, the SDK registers through OneSignal’s shared Firebase project for that session, and uses your project on a later session.
- With Firebase Installation ID registration turned on, registration fails with status
-32and retries on a later session.
Match your Firebase projects
Your app must register with the same Firebase project as the Service Account private key you uploaded to OneSignal. When the projects differ:- On the legacy token path, the OneSignal SDK registers through OneSignal’s shared Firebase project and logs a warning.
- With Firebase Installation ID registration turned on, registration fails with status
-6, and existing Subscriptions are marked invalid.
google-services.json looks like this:
FAQ
What happens if I skip google-services.json?
Push notifications still work today. The OneSignal SDK registers through OneSignal’s shared Firebase project, using FCM registration tokens. Google has deprecated FCM registration tokens in favor of Firebase Installation IDs. The shared project can’t register with Firebase Installation IDs, so addinggoogle-services.json now prepares your app for that change if and when Google starts requiring Firebase Installation IDs.
Without the file, you also can’t turn on Firebase Installation ID registration.
How do I check my Service Account permissions?
Service Account roles are granted on the IAM page in the Google Cloud Console, not in the Firebase Console and not on the Service Accounts page. The Service Account whose private key you upload to OneSignal needs these two roles:roles/firebase.admin), Editor, or Owner include both permissions and also satisfy the requirement. For OneSignal-only Service Accounts, prefer the narrow pair above to limit the impact if the private key is ever exposed.
If the OneSignal dashboard shows Invalid request after you upload your Service Account private key, missing roles are the most common cause.
Open the IAM page
Find your Service Account
client_email field in the private key you uploaded. It looks like firebase-adminsdk-xxxxx@YOUR_PROJECT_ID.iam.gserviceaccount.com. Paste that email into the filter box if the table is long.Add any missing roles
Save
Why am I seeing “This configuration is for a different Firebase Project”?
This error occurs when the uploaded private key belongs to a different Firebase project (a different Sender ID). Solution: Use the original Firebase project’s private key. If unavailable, contactsupport@onesignal.com with your App ID. Switching projects resets push tokens. Your users must reopen the app to get push again.
The reverse also happens: the uploaded key is correct, but the app ships a google-services.json from a different Firebase project. See Match your Firebase projects.
Can I change my Sender ID?
Yes, but changing it invalidates existing device tokens, because tokens are tied to the original Sender ID. Users stop receiving push notifications until they reopen the app and get a new token. For help, contactsupport@onesignal.com with your App ID.
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. Add Firebase to your existing Google Cloud project to keep your Sender ID, then upload a Service Account private key. Creating a new Firebase project gives you a new Sender ID, which invalidates existing push tokens. See Can I change my Sender ID?
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.Are the legacy FCM APIs still supported?
No. Google’s legacy FCM APIs are fully deprecated and no longer deliver notifications. If your app still uses them, upload a Service Account private key as described above to move to FCM V1.How can I check which apps are still using the Legacy API?
Call the View an app API for each app and check thefcm_v1_service_account_json field in the response:
- Present and non-empty: the app is on FCM V1.
- Missing or empty: the app is not configured for FCM V1. If the app sends Android push, it is still on the Legacy API and must be migrated.