Skip to content

gog oauth session notes

Source

  • Type: local-file
  • Path: /tmp/gog-oauth-session-notes.md
  • Bytes: 2055
  • Updated: 2026-08-08T09:00:52.108Z

Content

# gog (Google Workspace CLI) setup session — 2026-08-08

Live session notes from setting up `gog` for two Google accounts (25tylerv@gmail.com, tyler.n.vovan@gmail.com) against a new Google Cloud project (starlord-504706).

## What happened

1. Installed gog v0.34.1 from GitHub releases (no brew/docker/go on this box), checksum-verified, placed at ~/.local/bin/gog.
2. Created a Desktop-app OAuth client in Google Cloud Console.
3. First auth attempt via `gog auth setup --login` failed silently — turned out to be `org_internal` error (OAuth consent Audience defaulted to Internal, rejecting the personal Gmail account). Fixed by switching Audience to External + In production via Console > Google Auth Platform > Audience > "Make external".
4. Second/third auth attempts via `--login` timed out (`authorization canceled: context deadline exceeded`) — the local OAuth callback listener died before consent was completed in the browser, leaving a dead callback URL.
5. Switched to the remote two-step flow (`gog auth add <email> --services ... --remote --step 1` to print the URL with no listener, then `--step 2 --auth-url <pasted callback>` to exchange the code) — this succeeded reliably for both accounts.
6. After auth succeeded, individual commands (`gog drive ls`, `gog contacts list`, `gog sheets metadata`, `gog docs cat`) failed with "<API> is not enabled for this OAuth project" for Drive, Docs, Sheets, and People (Contacts) APIs — Gmail and Calendar were apparently already enabled, the rest were not. Enabled each manually via Console > APIs & Services > Library > [API] > Enable.
7. `gog me` (identity lookup) failed with a 403 needing the `profile` scope, which isn't part of any default `--services` value. Fixed by re-running auth with `--extra-scopes https://www.googleapis.com/auth/userinfo.profile --force-consent` for both accounts.
8. End state: both accounts fully authorized for gmail, calendar, drive, docs, sheets, contacts, tasks; `gog me` working; GOG_ACCOUNT=25tylerv@gmail.com set as default in ~/.openclaw/.env.

Notes

Referenced By