gcloud beta auth application-default

NAME
gcloud beta auth application-default - manage your active Application Default Credentials
SYNOPSIS
gcloud beta auth application-default COMMAND [GCLOUD_WIDE_FLAG]
DESCRIPTION
(BETA) Application Default Credentials (ADC) provide a method to get credentials used in calling Google APIs. The gcloud beta auth application-default command group allows you to manage active credentials on your machine that are used for local application development.

These credentials are only used by Google client libraries in your own application.

For more information about ADC and how it works, see Authenticating as a service account.

EXAMPLES
To use your own user credentials for your application to access an API, run:
gcloudbetaauthapplication-defaultlogin 

This will take you through a web flow to acquire new user credentials.

To create a service account and have your application use it for API access, run:

gcloudiamservice-accountscreatemy-account
gcloudiamservice-accountskeyscreatekey.json--iam-account=my-account@my-project.iam.gserviceaccount.com
exportGOOGLE_APPLICATION_CREDENTIALS=key.json
./my_application.sh
GCLOUD WIDE FLAGS
These flags are available to all commands: --help .

Run $ gcloud help for details.

COMMANDS
COMMAND is one of the following:
login
(BETA) Acquire new user credentials to use for Application Default Credentials.
(BETA) Print an access token for your current Application Default Credentials.
revoke
(BETA) Revoke previously generated Application Default Credentials.
set-quota-project
(BETA) Update or add a quota project in application default credentials (ADC).
NOTES
This command is currently in beta and might change without notice. These variants are also available:
gcloudauthapplication-default 
gcloudalphaauthapplication-default 

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026年05月27日 UTC.