Firebase Admin SDK service account credentials for server-side operations.
- Go to Firebase Console
- Select your project
- Click the gear icon (Project Settings)
- Go to "Service accounts" tab
- Click "Generate new private key"
- Rename the downloaded file to
serviceAccount.json
{
"type": "service_account",
"project_id": "your-project-id",
"private_key_id": "abc123...",
"private_key": "-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n",
"client_email": "firebase-adminsdk-xxxxx@your-project.iam.gserviceaccount.com",
"client_id": "123456789012345678901",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://oauth2.googleapis.com/token",
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/..."
}- This file contains sensitive credentials - never commit to version control
- Keep this file in the
config/directory - Ensure the service account has Firestore access permissions