Bug: raw calendar.events.list fails with insufficient scopes; +agenda helper succeeds with the same account
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- rust
- Domain
- api, authentication, cli
Research direction
Start by reproducing the raw gws calendar events list command from the report, then compare its authentication path with gws calendar +agenda --today and inspect gws auth status scopes. Done means raw calendar.events.list succeeds with the same freshly authorized account and supports the reported arbitrary date ranges without breaking the helper.
Written by the indexing model from the issue text.
Description
Bug: raw calendar.events.list fails with insufficient scopes; +agenda helper succeeds with the same account
gws version: 0.22.5 (reproduced on both the plugin-bundled binary and the @googleworkspace/cli npm package, same version)
OS: macOS (darwin-arm64)
Auth method: oauth2, interactive browser login (not token_env_var)
Repro
gws calendar events list --params '{"calendarId":"primary","timeMin":"2026-07-03T00:00:00Z","timeMax":"2026-07-04T23:59:59Z","singleEvents":true,"maxResults":1}'
Fails every time with:
error[api]: Request had insufficient authentication scopes.
This happens even immediately after a fresh interactive OAuth consent grant that explicitly includes https://www.googleapis.com/auth/calendar, confirmed via gws auth status (token_valid: true, has_refresh_token: true, scope list includes calendar).
What works, same account, same underlying operation
gws calendar +agenda --today— succeeds, returns real events (including from theprimary/self calendar).- Google Calendar API
events.listcalled through a separate OAuth client (a different tool wired to the same Google account) — succeeds with equivalent params.
Ruled out
- Not the
calendarIdalias — fails identically with"primary"and with the literal calendar ID ([email protected]). - Not the date range — fails identically for a 2024 range and a current-date range.
- Not a stale/cached token — fails immediately after a fresh interactive consent grant (each invocation re-triggers the consent screen and still fails afterward).
- Not a version mismatch — confirmed identical version (0.22.5) across two independently installed copies of the binary.
Impact
Any raw <service> <resource> <method> call to calendar.events.list is unusable; only the +agenda helper works, and it only supports relative/forward date windows (--today, --tomorrow, --days N), not arbitrary historical ranges. This blocks any integration that needs calendar events for a specific past date range (e.g. weekly backfills).
Possibly related
- #519 — 403 insufficientPermissions: Request had insufficient authentication scopes.
- #489 — Bug: Windows — API calls fail with insufficient scopes despite valid refresh token
Neither is an exact match: both describe general/all-API breakage, while this report isolates the failure to the raw events.list method path specifically, with the +agenda helper and a separate OAuth client succeeding on the identical account and data.
- Dominant language
- Rust
- Stars
- 32.3k
- Forks
- 2k
- Avg merge
- 16h 3m
- Merged PRs (30d)
- 1
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from googleworkspace/cli
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
googleworkspace/cli#984 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
googleworkspace/cli#983 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
googleworkspace/cli#958 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
googleworkspace/cli#921 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
googleworkspace/cli#920 ·
Maintainers usually reply within 1 day
All issues in googleworkspace/cli
Similar issues
-
area:cli area:security bug priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
status: new topic: ga4gh-sdk type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
comp-rbac
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
ClickHouse/ClickHouse#131875 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
bug(python): read_transaction raises TypeError on a Rewrite with rewritten indicesPossibly taken @Borg93 claimed this today. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
lance-format/lance#11117 ·
Maintainers usually reply within 2 days