- 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.

Page of Projects within Firebase
2. Enable Firebase Cloud Messaging API v1
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.
3. Generate a Service Account JSON file
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
4. Upload your credentials to OneSignal
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
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, contactsupport@onesignal.com
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, contactsupport@onesignal.com
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