How you set up Application Default Credentials (ADC) for use by Cloud Client Libraries, Google API Client Libraries, and the REST and RPC APIs depends on the environment where your code is running.
For information about where ADC looks for credentials and in what order, see How Application Default Credentials works.
If you are using API keys, then you don't need to set up ADC. For more information, see Use API keys to access APIs.
Provide credentials to ADC
Select the environment where your code is running:
- Local development environment
- Resource with an attached service account
- Containerized environment
- On-premises or another cloud provider
- Cloud-based development environment
What's next
- Learn more about how ADC finds credentials.
- Authenticate for using Cloud Client Libraries.
- Authenticate for using REST.
- Explore authentication methods.