← back to Api Token Dashboard
dashboard: probe George Calendar via the real GMAIL client path (accessNotConfigured = API disabled), not the vestigial standalone token
12c500e63c5f0875fac16b7b0c6a27d7be093b86 · 2026-07-01 14:22:10 -0700 · Steve Abrams
Files touched
Diff
commit 12c500e63c5f0875fac16b7b0c6a27d7be093b86
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Wed Jul 1 14:22:10 2026 -0700
dashboard: probe George Calendar via the real GMAIL client path (accessNotConfigured = API disabled), not the vestigial standalone token
---
server.mjs | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
diff --git a/server.mjs b/server.mjs
index d492a9a..7e41bf8 100644
--- a/server.mjs
+++ b/server.mjs
@@ -71,10 +71,22 @@ function catalog() {
mailbox('agentabrams', g.AGENTABRAMS_REFRESH_TOKEN, 'AGENTABRAMS_REFRESH_TOKEN');
add({
- key: 'google-calendar', name: 'George Calendar (event create)', category: 'Google · George Mail', tag: last4(g.GOOGLE_CALENDAR_REFRESH_TOKEN),
+ key: 'google-calendar', name: 'George Calendar (event create)', category: 'Google · George Mail', tag: '(via GMAIL client)',
fixUrl: 'https://console.developers.google.com/apis/api/calendar-json.googleapis.com/overview?project=493480746821',
- instructions: 'ROOT CAUSE: Calendar API is DISABLED in project 493480746821 (403 accessNotConfigured), and the standalone token is dead. Fix: click the link → Enable the API. Then the code can use the live GMAIL client (which already has the calendar scope) — no re-consent needed.',
- probe: () => googleRefresh(gid, gs, g.GOOGLE_CALENDAR_REFRESH_TOKEN), envName: 'GOOGLE_CALENDAR_REFRESH_TOKEN',
+ instructions: 'ONLY blocker: Calendar API is DISABLED in project 493480746821 (403 accessNotConfigured). George already drives calendar via the live GMAIL client (which holds the calendar scope) — no code change, no re-consent, no token needed. Fix: click the link → Enable → this flips green on next re-check. (The old standalone GOOGLE_CALENDAR_REFRESH_TOKEN is vestigial/unused.)',
+ envName: 'uses GMAIL_REFRESH_TOKEN',
+ probe: async () => {
+ if (!gid || !gs || !g.GMAIL_REFRESH_TOKEN) return MISSING('GMAIL client absent');
+ try {
+ const tr = await fetchT('https://oauth2.googleapis.com/token', { method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, body: new URLSearchParams({ client_id: gid, client_secret: gs, refresh_token: g.GMAIL_REFRESH_TOKEN, grant_type: 'refresh_token' }) });
+ const tj = await tr.json().catch(() => ({}));
+ if (!tj.access_token) return DEAD('GMAIL token dead');
+ const cr = await fetchT('https://www.googleapis.com/calendar/v3/users/me/calendarList?maxResults=1', { headers: { Authorization: 'Bearer ' + tj.access_token } });
+ if (cr.ok) return OK();
+ const cj = await cr.json().catch(() => ({}));
+ return DEAD(cj?.error?.errors?.[0]?.reason || ('http ' + cr.status));
+ } catch (e) { return UNKNOWN(e.message); }
+ },
});
const tsd = loadEnv(`${HOME}/Projects/thesetdecorator/.env`); // Drive token's real home (per routes.json)
← 4c55a10 dashboard: read Drive token from its real .env (thesetdecora
·
back to Api Token Dashboard
·
chore: lint (security review), refactor (probeURL helper), h 23ce98d →