Bug: raw calendar.events.list fails with insufficient scopes; +agenda helper succeeds with the same account
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 48/100
- Tipo de issue
- Bug
- Clareza
- Razoavelmente clara
- Status de atividade
- Ativa
- Stack de tecnologia
- rust
- Domínio
- api, authentication, cli
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- Rust
- Estrelas
- 32.3k
- Forks
- 2k
- Merge médio
- 16h 3min
- PRs com merge (30d)
- 1
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de googleworkspace/cli
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 80/100
googleworkspace/cli#984 ·
Mantenedores costumam responder em até 1 dia
-
auth export masks secrets by default with no warning; consumers fail later with invalid_clientAberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 64/100
googleworkspace/cli#983 ·
Mantenedores costumam responder em até 1 dia
-
Replace gemini with agyAberta
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 82/100
googleworkspace/cli#958 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
googleworkspace/cli#921 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 88/100
googleworkspace/cli#920 ·
Mantenedores costumam responder em até 1 dia
Todas as issues de googleworkspace/cli
Issues semelhantes
-
benchmark-review
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 63/100
Mantenedores costumam responder em até 1 dia
-
area:filesystem bug need-triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 85/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 1 dia
-
Captions panel does not offer to show an existing transcriptTalvez já em andamento @thedavidweng assumiu hoje. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
CapSoftware/Cap#4276 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
libracoder/kiri#364 ·
Mantenedores costumam responder em até 1 dia