Auth
gum calls Google APIs with credentials from the selected local profile. It does not ship a hidden Google account, a shared OAuth client, or a background cloud identity.
Pick the auth path
Use gum describe <op_id> before setup. The operation record shows the auth strategy, scopes, risk class, and required arguments.
gum describe gmail.users.messages.list
gum auth setup gmail.users.messages.list| Catalog auth strategy | Use it for | Setup command |
|---|---|---|
byo_oauth |
Gmail, Calendar, Drive, Docs, Sheets, Slides, Tasks, YouTube Data API, People, Photos, Chat, Classroom, Meet, Apps Script, Admin, Vault, Search Console, Google Ads | gum auth use-oauth-client, then gum login |
api_key |
Maps, Places, Routes, Custom Search | gum auth use-api-key --stdin |
service_account |
Operations or plugins that explicitly accept a Google service account key | gum auth use-service-account <key.json> |
adc |
Hosts already running under Google Application Default Credentials | Configure ADC on the host |
plugin_managed |
Plugin-backed operations whose upstream auth is owned by the plugin | Follow the plugin's setup |
none |
Local or metadata operations that do not call an external API | No credential setup |
Before any auth setup
- Choose the profile that will own the credential.
gum --profile work auth status- Identify the operation you plan to call.
gum search "search console sites"
gum describe searchconsole.sites.list- Read the service page for product prerequisites. Google project setup still
matters: the API must be enabled, the OAuth consent screen or API key must permit the API, and the signed-in account must have access to the target data.
Bring-your-own OAuth
Use this for most Google Workspace and Google product APIs.
- In Google Cloud Console, create or select the project that will own the OAuth
- Enable each API you plan to call. For example, Search Console operations need
- Configure the OAuth consent screen. If the app is in testing mode, add the
- Add the scopes reported by
gum describeor by the service page. - Create credentials:
OAuth client ID, application typeDesktop app. - Store the OAuth client in gum.
client.
the Search Console API; YouTube operations need the YouTube Data API v3.
Google account you will sign in with as a test user.
printf '%s' "$GOOGLE_OAUTH_CLIENT_SECRET" \
| gum auth use-oauth-client --client-id "$GOOGLE_OAUTH_CLIENT_ID" --secret-stdin- Authorize the service or exact scopes. Service names match the catalog names
used in docs/services.
gum login --service gmail,calendar
gum login --service searchconsole
gum login --scope https://www.googleapis.com/auth/webmasters.readonly- Verify the grant before dispatch.
gum auth status --scopes webmasters.readonly
gum read searchconsole.sites.list --output jsonOAuth is successful when gum auth status can resolve a token for the requested scope and the first read call reaches Google. If Google returns accessNotConfigured, the API is disabled in the project that owns the OAuth client. If gum returns SCOPE_MISSING, run gum login again with the missing scope or service.
API key
Use this for the v1 catalog's Maps, Places, Routes, and Custom Search operations.
- Enable the required API in Google Cloud.
- Create an API key.
- Restrict the key to the API and to the host, referrer, or environment that
- Store the key in gum.
should use it.
printf '%s' "$GOOGLE_API_KEY" | gum auth use-api-key --stdin- Verify with a read operation.
gum describe maps.timezone.get
gum read maps.timezone.get --args '{"location":"37.7749,-122.4194","timestamp":0}' --output jsonAPI-key auth is successful when gum can read the stored key and Google accepts the key for the enabled API. PERMISSION_DENIED, REQUEST_DENIED, or quota errors usually mean the key is restricted incorrectly, the API is disabled, or the Cloud project is not allowed to use that API.
Service account
Use this only for operations or plugins whose auth strategy requires a service account key. A service account is not a substitute for user OAuth on APIs that require a user grant.
- Create or select a Google Cloud service account.
- Grant only the roles required for the target API.
- If the API requires Workspace domain-wide delegation, enable delegation and
- Download the JSON key to the host running gum.
- Store the key in the selected profile.
authorize the client ID in the Workspace Admin console.
gum auth use-service-account ./service-account.json- Verify the operation that requires the service account.
gum auth setup <op_id>
gum describe <op_id>Service-account auth is successful when gum auth setup <op_id> no longer reports a missing key and the target API accepts the service account identity. Workspace APIs may still reject the call if delegation, scopes, or admin roles are incomplete.
ADC
Use Application Default Credentials when gum runs inside an environment that already provides Google credentials, such as a configured developer workstation, Cloud Shell, a VM, or a workload identity setup.
- Configure ADC on the host. For local development this is usually done outside
- Confirm the host can expose ADC to the process running gum.
- Probe the scope you need.
gum.
gum auth probe --strategy adc --scopes webmasters.readonly- Run the target operation.
gum read searchconsole.sites.list --output jsonADC auth is successful when gum auth probe --strategy adc returns non-secret token metadata for the requested scope. If the probe fails, fix ADC on the host; storing an OAuth client in gum does not repair ADC.
Google Ads
Google Ads uses OAuth plus a developer token.
- Enable the Google Ads API in Google Cloud.
- Create and store a Desktop OAuth client as described in the OAuth section.
- Store the developer token.
printf '%s' "$GOOGLE_ADS_DEVELOPER_TOKEN" | gum auth use-ads-developer-token --stdin- Authorize the Ads scope.
gum login --service googleads- Verify both the OAuth grant and the Ads operation shape.
gum auth status --scopes adwords
gum describe googleads.keywordPlanIdeas.generateKeywordHistoricalMetricsGoogle Ads auth is successful only when OAuth succeeds, the developer token is stored, and the signed-in account can access the customer ID used in the call. Google can still reject requests when the token is pending, the customer ID is wrong, or the account lacks access.
Plugin-managed auth
Plugin-managed operations do not use gum's Google OAuth client, API key, ADC, or service-account store unless the plugin explicitly documents that dependency.
- Inspect the operation.
gum describe youtube.transcripts.get- Check the plugin inventory.
gum plugin list
gum plugin info <plugin-name>- Complete the plugin's own credential or prerequisite setup.
- Run the read call.
gum read youtube.transcripts.get --args '{"video_id":"<video-id>"}' --output jsonPlugin-managed auth is successful when the plugin reports ready state and the operation returns data from its upstream source.
Troubleshooting
AUTH_REQUIRED: gum could not resolve a credential for the operation.SCOPE_MISSING: the credential exists but lacks at least one required OAuthaccessNotConfigured: Google says the API is disabled in the Cloud projectPERMISSION_DENIED: the credential exists, but Google rejected the account,- Workspace admin APIs require a managed Workspace domain and suitable admin
scope.
that owns the credential.
API key, Workspace role, customer ID, property, or resource permissions.
privileges. Consumer accounts cannot satisfy Admin SDK or Vault admin flows.
