How to generate a google-services.json file in Firebase?

A google-services.json file and an FCM Server Key is required in order to send Push Notifications to your app. Follow these steps to generate google-service.json file

Harsh Tomar
3 min readJul 11, 2020

Generate google-services.json file

  1. Go to Firebase Console and click on “Create a Project”. (You may need to sign in to your Google Account if you are not signed in already)

2. Enter your app name as project name and click on “Select parent resource”

3. Choose a Parent Resource and click on Done

4. Check “I accept the Firebase Terms” and click on Continue

5. Disable the option “Enable Google Analytics for this project”

6. Click on “Create Project”

7. Your project will be created. Click on “Continue”

8. You will be redirected to Firebase Dashboard. Click on Android icon

9. Get your app’s Android package name from this link. Make sure you enter the same email address that you have used while purchasing/redeeming. Your package name will be similar to <com.apptart.you-app-name-inlowercase>

10. Copy the package name and paste in the “Android Package Name” field and click on the “Register App” button.

11. Congratulations, Your google-service file is generated. Click on the “Download google-service.json” file to download it.

Get FCM Server Key

  1. At the top of the sidebar, click the gear icon to the right of Project Overview to go to your project settings.

2. Go to “Cloud Messaging” tab in your Project Settings

3. Copy the token under “Server Key”

--

--