Accéder à la console

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 uses underlying GCP identifiers (most importantly, the projectId) as its own for easy interop with GCP 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.

All fields listed in the request body are required.

To call projects.addFirebase, a member must be an Editor or Owner for the existing GCP Project. Service accounts cannot call projects.addFirebase.

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/projectId

After calling projects.addFirebase, the projectId of the GCP Project is also the projectId of the FirebaseProject.

Request body

The request body contains data with the following structure:

JSON representation
{
  "timeZone": string,
  "regionCode": string,
  "locationId": string
}
Fields
timeZone

string

The time zone that the account will use for Firebase Analytics data.
For example: America/Los_Angeles or Africa/Abidjan

regionCode

string

The region code (CLDR) that the account will use for Firebase Analytics data.
For example: US, GB, or DE

In Java, use com.google.i18n.identifiers.RegionCode.

locationId

string

The default resource location of other Firebase resources (such as Cloud Firestore).
If a GCP Project is already associated with an App Engine region, the value of this field is ignored.
For examples, see https://cloud.google.com/appengine/docs/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.