Getting Started

This page explains how developers can get started using Cloud APIs.

Creating a Google account

To use Cloud APIs in your applications, you first need to have a Google account. This allows you to use Google developer products such as the GCP Console and Stackdriver Logging and Monitoring. If you don't have a Google account, you can sign up here.

Creating a Google project

To use Cloud APIs, you also need to have a Google project. A project is equivalent to a developer account. It serves as a resource container for your Google Cloud Platform (GCP) resources. It also provides an isolation boundary for your usage of GCP services, so you can manage quota limits and billing independently at project level. Usage telemetry and dashboards are grouped by project as well. If you don't already have a project, you can create one using the GCP Console.

A project can own a wide range of resources, including API keys, OAuth clients, service accounts, Compute Engine VMs, Cloud Storage buckets, and BigQuery datasets. When an application calls a Cloud API, the project that owns the application credentials is called the client project, and the project that owns the target resource is called the resource project. One API request may touch multiple resources, hence multiple resource projects are involved.

Enabling APIs



To enable an API for a project using the console:

  1. Go to the GCP Console API Library.
  4. On the API page, click ENABLE.


Enabling billing

Some Cloud APIs charge for usage. You need to enable billing for your project before you can start using these APIs in your project. The API usage in a project is charged to the billing account associated with the project.

If you don't have a billing account, go to the GCP Console billing page and follow the instructions to create one. Then link your billing account to your project.

Getting and using application credentials

Cloud APIs only accept registered API requests. It means every API request must come from a registered application. This allows the API provider to attribute and report API usage to the correct Google project.

Cloud APIs use application credentials for identifying their calling applications, including API keys, OAuth client IDs, and service accounts. We recommend using a service account in most cases when calling Cloud APIs. A service account is a Google account that is associated with your GCP project, as opposed to a specific user. Service accounts can be used for authentication regardless of where your code runs.

You create application credentials in the GCP Console, then use them in your application to make API requests. To create application credentials, go to the Credentials page, click Create credentials, then choose the type of credentials you want to create.

To make API calls using an API key, you just need to pass it in the HTTP header: X-Goog-API-Key: xxx, or as an URL query parameter: ?key=xxx. Note that a limited number of Cloud APIs allow access using only an API key.

To make API calls using an OAuth client ID or a service account, you need to get the application credentials from the GCP Console and use them with your client libraries.

If you are new to Google APIs, and just want to run some manual tests before writing any code, you can use oauth2l to generate the request credentials and use them with the curl command.

For more information authentication and application credentials, see the Authentication Overview.

More information


For information about enabling billing on your project, see Modify a project's billing settings.

For more information about using an API or command line tool to enable and disable APIs, see Enabling and disabling services in the Service Usage documentation.

Czy ta strona była pomocna? Podziel się z nami swoją opinią:

Wyślij opinię na temat...