Method: projects.addFirebase

Adds Firebase resources to the specified existing Google Cloud Platform (GCP) Project.

Since a FirebaseProject is actually also a GCP Project, a FirebaseProject has the same underlying GCP identifiers (projectNumber and projectId). This allows for easy interop with Google APIs.

The result of this call is an Operation. Poll the Operation to track the provisioning process by calling operations.get until done is true. When done is true, the Operation has either succeeded or failed. If the Operation succeeded, its response is set to a FirebaseProject; if the Operation failed, its error is set to a google.rpc.Status. The Operation is automatically deleted after completion, so there is no need to call operations.delete.

This method does not modify any billing account information on the underlying GCP Project.

To call projects.addFirebase, a project member or service account must have the following permissions (the IAM roles of Editor and Owner contain these permissions): firebase.projects.update, resourcemanager.projects.get, serviceusage.services.enable, and serviceusage.services.get.

HTTP request

POST https://firebase.googleapis.com/v1beta1/{project=projects/*}:addFirebase

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
project

string

The resource name of the GCP Project to which Firebase resources will be added, in the format:

projects/PROJECT_IDENTIFIER

Refer to the FirebaseProject name field for details about PROJECT_IDENTIFIER values.

After calling projects.addFirebase, the unique Project identifiers ( projectNumber and projectId) of the underlying GCP Project are also the identifiers of the FirebaseProject.

Request body

The request body contains data with the following structure:

JSON representation
{
  "locationId": string
}
Fields
locationId

string

Deprecated. Instead, to set a Project's default GCP resource location, call defaultLocation.finalize after you add Firebase resources to the GCP Project.

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

Response body

If successful, the response body contains an instance of Operation.

Authorization Scopes

Requires one of the following OAuth scopes:

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

For more information, see the Authentication Overview.