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 for obtaining an API key:
Ask a member of the GCP project to create an API key for you.
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.
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.
To enable an API that you have been granted access to:
- In the GCP Console, go to APIs & services for your project.
- On the Library page, click Private APIs.
- 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.
- Click Enable.
Enter the following to display the project IDs for your Cloud projects:
gcloud projects list
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]
Get a list of services that you can enable in your project:
gcloud services list --available
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.