Reference

`gog auth add`

gog auth add

Generated from gog schema --json. Do not edit this page by hand; run make docs-commands.

Authorize and store a refresh token

#Usage

gog auth add <email> [flags]

#Parent

#Flags

FlagTypeDefaultHelp
--access-tokenstringUse provided access token directly (bypasses stored refresh tokens; token expires in ~1h)
-a
--account
--acct
stringAccount email for API commands (gmail/calendar/chat/classroom/drive/docs/slides/contacts/tasks/people/sheets/forms/appscript/ads)
--auth-urlstringRedirect URL from browser (manual flow; required for --remote --step 2)
--clientstringOAuth client name (selects stored credentials + token bucket)
--colorstringautoColor output: auto|always|never
--disable-commandsstringComma-separated list of disabled commands; dot paths allowed
--drive-scopestringfullDrive scope mode: full|readonly|file
-n
--dry-run
--dryrun
--noop
--preview
boolDo not make changes; print intended actions and exit successfully
--enable-commandsstringComma-separated list of enabled commands; dot paths allowed (restricts CLI)
--extra-scopesstringComma-separated list of additional OAuth scope URIs to request (appended after service scopes)
-y
--force
--assume-yes
--yes
boolSkip confirmations for destructive commands
--force-consentboolForce consent screen to obtain a refresh token
--gmail-no-sendboolfalseBlock Gmail send operations (agent safety)
--gmail-scopestringfullGmail scope mode: full|readonly
-h
--help
kong.helpFlagShow context-sensitive help.
-j
--json
--machine
boolfalseOutput JSON to stdout (best for scripting)
--listen-addrstringAddress to listen on for OAuth callback (for example 0.0.0.0 or 0.0.0.0:8080)
--manualboolBrowserless auth flow (paste redirect URL)
--no-input
--non-interactive
--noninteractive
boolNever prompt; fail instead (useful for CI)
-p
--plain
--tsv
boolfalseOutput stable, parseable text to stdout (TSV; no colors)
--readonlyboolUse read-only scopes where available (still includes OIDC identity scopes)
--redirect-hoststringHostname for OAuth callback in browser flows; builds https://{host}/oauth2/callback
--redirect-uristringOverride OAuth redirect URI for manual/remote flows (for example https://host.example/oauth2/callback)
--remoteboolRemote/server-friendly manual flow (print URL, then exchange code)
--results-onlyboolIn JSON mode, emit only the primary result (drops envelope fields like nextPageToken)
--select
--pick
--project
stringIn JSON mode, select comma-separated fields (best-effort; supports dot paths). Desire path: use --fields for most commands.
--servicesstringuserServices to authorize: user|all or comma-separated gmail,calendar,chat,classroom,drive,docs,slides,contacts,tasks,sheets,people,forms,appscript,ads (Keep uses service account: gog auth service-account set)
--stepintRemote auth step: 1=print URL, 2=exchange code
--timeouttime.DurationAuthorization timeout (manual flows default to 5m)
-v
--verbose
boolEnable verbose logging
--versionkong.VersionFlagPrint version and exit

#See Also