Enabling an API in your Google Cloud project Stay organized with collections Save and categorize content based on your preferences.
When an API requires an API key and the API is associated with aGoogle Cloud project that you don't have access to, you have thefollowing 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 togrant you access to the project so that you can create an API key in the same project that the API isassociated with.
Option 3: Ask a security admin togrant you access to enable the API in your own Google Cloud project so that you can create an API key.
Before you begin
Make sure that billing is enabled for your Google Cloud project.
Enabling an API
If you used option 3 and asked someone to grant you access to enable theAPI, follow the steps below to enable the API in your own Google Cloudproject.
To enable an API:
Console
- In the Google Cloud console, go to APIs & services for yourproject.
- On theLibrary page, clickPrivate APIs.If you don't see the API listed, that means you haven't been grantedaccess to enable the API.
- Click the API you want to enable. If you need help finding the API, usethe search field.
- In the page that displays information about the API, clickEnable.
gcloud
Enter the following to display the project IDs for yourGoogle Cloud projects:
gcloud projects list
Using the applicable project ID from the previous step, set the defaultproject to the one in which you want to enable the API:
gcloud config set projectYOUR_PROJECT_ID
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 grantedaccess to enable the API.
Using the applicable service name from the previous step, enable theservice:
gcloud services enableSERVICE_NAME
For more information on the preceding commands, see thegcloud
reference.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-07-11 UTC.