Enabling an API in your Google Cloud project

When an API requires an API key and the API is associated with a Google Cloud project that you don't have access to, you have the following options to obtain an API key:

  • Option 1: Ask a security admin to create an API key for you.

  • Option 2: Ask a security admin 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 security admin to grant you access to enable the API in your own Google Cloud project so that you can create an API key.

Enabling an API

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

To enable an API:

Console

  1. In the Google Cloud console, go to APIs & services for your project.

    Go to 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.
  4. In the page that displays information about the API, click Enable.

gcloud

  1. Enter the following to display the project IDs for your Google 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 preceding commands, see the gcloud reference.