Enabling an API in Your Cloud Project

When an API requires an API key and the API is associated with a GCP project that you do not have access to, you have the following options to obtain an API key:

  • Option 1: Ask a member of the GCP project to create an API key for you.

  • Option 2: Ask a member of the GCP project to grant you access to the project so that you can create an API key in the same project that the API is associated with.

  • Option 3: Ask a member of the GCP project to grant you access to enable the API in your own GCP project so that you can create an API key.

Enabling an API

If you used option 3 above and asked someone to grant you access to enable the API, follow the steps below to enable the API in your own GCP project.

To enable an API:

Console

  1. In the GCP Console, go to APIs & services for your project.

    APIs & services

  2. On the Library page, click Private APIs. If you don't see the API listed, that means you haven't been granted access to enable the API.
  3. Click the API you want to enable. If you need help finding the API, use the search field. A page displays with information about the API.
  4. Click Enable.

Command Line

  1. Enter the following to display the project IDs for your Cloud projects:

    gcloud projects list
    
  2. Using the applicable project ID from the previous step, set the default project to the one in which you want to enable the API:

    gcloud config set project [YOUR_PROJECT_ID]
    
  3. Get a list of services that you can enable in your project:

    gcloud services list --available
    

    If you don't see the API listed, that means you haven't been granted access to enable the API.

  4. Using the applicable service name from the previous step, enable the service:

     gcloud services enable [SERVICE_NAME]
    

For more information on the above commands, see the gcloud reference.

Was this page helpful? Let us know how we did:

Send feedback about...

Cloud Endpoints with gRPC
Need help? Visit our support page.