openclaw - 💡(How to fix) Fix [Bug] Gmail OAuth token refresh succeeds but Gmail API returns 401 [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#78257Fetched 2026-05-07 03:39:08
View on GitHub
Comments
1
Participants
2
Timeline
2
Reactions
2
Author
Timeline (top)
closed ×1commented ×1

Fix Action

Fix / Workaround

Workaround: himalaya for email, gog drive for Drive operations.

RAW_BUFFERClick to expand / collapse

Bug: Gmail OAuth token refresh succeeds but Gmail API returns 401

OAuth refresh reports "Token still valid" (~59min remaining) but Gmail API returns 401 UNAUTHENTICATED.

Symptoms:

  • gog-token-refresh.sh → "Token still valid"
  • Gmail API curl → 401 UNAUTHENTICATED
  • himalaya IMAP works (different auth)
  • Drive API also fails 401

Environment:

  • OpenClaw 2026.5.4 (325df3e), Hostinger VPS Ubuntu 24.04
  • Token: /data/.openclaw/workspace/google-oauth-token.json
  • Client: 530599478681-p6j4rkvar2qgo0nkdp1pkb1kv997debv (Desktop OAuth)

Workaround: himalaya for email, gog drive for Drive operations.

Possible causes: Token partially revoked (refresh works, access fails), Desktop OAuth scopes missing Gmail, or insufficient scopes in original authorization.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING