Skip to content

How To Gennerate FCM Private Key File (JSON)

To generate a private key file for your service account:

  1. In the Firebase console > Porject settings > Cloud Messaging tab, make sure the "Firebase Cloud Messaging API (V1)" Enabled.

Firebase Could Messaging API(V1) Enabled

  1. In the Porject settings > Service accounts tab, click "Generate new private key".

Firebase Generate new Private Key

  1. In the next alert dialog, click "Generate key" and securely store the JSON file containing the key.

Firebase Generate new Private Key

  1. The JSON private key file would looks like:

Firebase Private Key File Demo