Method: projects.webApps.getConfig

Gets the configuration artifact associated with the specified WebApp.

HTTP request

GET https://firebase.googleapis.com/v1beta1/{name=projects/*/webApps/*/config}

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
name

string

The resource name of the WebApp configuration to download, in the format:

projects/PROJECT_IDENTIFIER/webApps/APP_ID/config


Since an APP_ID is a unique identifier, the Unique Resource from Sub-Collection access pattern may be used here, in the format:

projects/-/webApps/APP_ID


Refer to the WebApp name field for details about PROJECT_IDENTIFIER and APP_ID values.

Request body

The request body must be empty.

Response body

Configuration metadata of a single Firebase App for the web.

If successful, the response body contains data with the following structure:

JSON representation
{
  "projectId": string,
  "appId": string,
  "databaseURL": string,
  "storageBucket": string,
  "locationId": string,
  "apiKey": string,
  "authDomain": string,
  "messagingSenderId": string,
  "measurementId": string,
  "projectNumber": string,
  "realtimeDatabaseUrl": string,
  "version": string
}
Fields
projectId

string

Immutable. A user-assigned unique identifier for the FirebaseProject.

appId

string

Immutable. The globally unique, Firebase-assigned identifier for the WebApp.

databaseURL
(deprecated)

string

DEPRECATED. Instead, find the default Firebase Realtime Database instance name using the list endpoint within the Firebase Realtime Database REST API. Note that the default instance for the Project might not yet be provisioned, so the return might not contain a default instance.

The default Firebase Realtime Database URL.

storageBucket
(deprecated)

string

DEPRECATED. Instead, find the default Cloud Storage for Firebase bucket using the list endpoint within the Cloud Storage for Firebase REST API. Note that the default bucket for the Project might not yet be provisioned, so the return might not contain a default bucket.

The default Cloud Storage for Firebase storage bucket name.

locationId
(deprecated)

string

DEPRECATED. Instead, use product-specific REST APIs to find the location of resources.

The ID of the Project's default GCP resource location. The location is one of the available GCP resource locations.

This field is omitted if the default GCP resource location has not been finalized yet. To set a Project's default GCP resource location, call defaultLocation.finalize after you add Firebase resources to the Project.

apiKey

string

The keyString of the API key associated with the WebApp.

Note that this value is not the apiKeyId (the UID) of the API key associated with the WebApp.

authDomain

string

The domain Firebase Auth configures for OAuth redirects, in the format:

PROJECT_ID.firebaseapp.com

messagingSenderId

string

The sender ID for use with Firebase Cloud Messaging.

measurementId

string

The unique Google-assigned identifier of the Google Analytics web stream associated with the WebApp. Firebase SDKs use this ID to interact with Google Analytics APIs.

This field is only present if the WebApp is linked to a web stream in a Google Analytics App + Web property. Learn more about this ID and Google Analytics web streams in the Analytics documentation.

To generate a measurementId and link the WebApp with a Google Analytics web stream, call projects.addGoogleAnalytics.

For apps using the Firebase JavaScript SDK v7.20.0 and later, Firebase dynamically fetches the measurementId when your app initializes Analytics. Having this ID in your config object is optional, but it does serve as a fallback in the rare case that the dynamic fetch fails.

projectNumber

string

Output only. Immutable. The globally unique, Google-assigned canonical identifier for the Project. Use this identifier when configuring integrations and/or making API calls to Google Cloud or third-party services.

realtimeDatabaseUrl

string

Optional. Duplicate field for the URL of the default RTDB instances (if there is one) that uses the same field name as the unified V2 config file format. We wanted to make a single config file format for all the app platforms (Android, iOS and web) and we had to pick consistent names for all the fields since there was some varience between the platforms. If the request asks for the V2 format we will populate this field instead of realtimeDatabaseInstanceUri.

version

string

Version of the config specification.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloud-platform
  • https://www.googleapis.com/auth/cloud-platform.read-only
  • https://www.googleapis.com/auth/firebase
  • https://www.googleapis.com/auth/firebase.readonly

For more information, see the Authentication Overview.