Reference

`gog gmail settings watch serve`

gog gmail settings watch serve

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

Run Pub/Sub push handler

#Usage

gog gmail (mail,email) settings watch serve [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)
--bindstring127.0.0.1Bind address
--clientstringOAuth client name (selects stored credentials + token bucket)
--colorstringautoColor output: auto|always|never
--disable-commandsstringComma-separated list of disabled commands; dot paths allowed
-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)
--exclude-labelsstringSPAM,TRASHList of Gmail label IDs to exclude from hook payload (e.g. SPAM,TRASH,Label_123). Set to empty string to disable.
--fetch-delaystring3sDelay before fetching Gmail history (seconds or duration)
-y
--force
--assume-yes
--yes
boolSkip confirmations for destructive commands
--gmail-no-sendboolfalseBlock Gmail send operations (agent safety)
-h
--help
kong.helpFlagShow context-sensitive help.
--history-types[]stringHistory types to include (repeatable, comma-separated: messageAdded,messageDeleted,labelAdded,labelRemoved). Default: messageAdded
--hook-tokenstringWebhook bearer token
--hook-urlstringWebhook URL to forward messages
--include-bodyboolInclude text/plain body in hook payload
-j
--json
--machine
boolfalseOutput JSON to stdout (best for scripting)
--localboolUse local timezone (default behavior, useful to override --timezone)
--max-bytesint20000Max bytes of body to include
--no-input
--non-interactive
--noninteractive
boolNever prompt; fail instead (useful for CI)
--oidc-audiencestringExpected OIDC audience
--oidc-emailstringExpected service account email
--pathstring/gmail-pubsubPush handler path
-p
--plain
--tsv
boolfalseOutput stable, parseable text to stdout (TSV; no colors)
--portint8788Listen port
--results-onlyboolIn JSON mode, emit only the primary result (drops envelope fields like nextPageToken)
--save-hookboolPersist hook settings to watch state
--select
--pick
--project
stringIn JSON mode, select comma-separated fields (best-effort; supports dot paths). Desire path: use --fields for most commands.
-z
--timezone
stringOutput timezone (IANA name, e.g. America/New_York, UTC). Default: local
--tokenstringShared token for x-gog-token or ?token=
-v
--verbose
boolEnable verbose logging
--verify-oidcboolVerify Pub/Sub OIDC tokens
--versionkong.VersionFlagPrint version and exit

#See Also