Categories
firebase firebase-authentication firebase-realtime-database java

Where can I get “serviceAccountCredentials.json” for Firebase Admin?

Here is said what I need to setup Firebase on java:

FirebaseOptions options = new FirebaseOptions.Builder()
.setDatabaseUrl("https://databaseName.firebaseio.com")
.setServiceAccount(new FileInputStream("path/to/serviceAccountCredentials.json"))
.build();
FirebaseApp.initializeApp(options);

But where can I get serviceAccountCredentials.json ?

UPDATED:
I found that this file seems should have this fields, but where get this values?

{
"type": "",
"project_id": "",
"private_key_id": "",
"private_key": "",
"client_email": "",
"client_id": "",
"auth_uri": "",
"token_uri": "",
"auth_provider_x509_cert_url": "",
"client_x509_cert_url": ""
}