google-direct-oauth

Connects Google Calendar and Gmail via user-owned OAuth credentials with automatic token refresh.

Updated Sep 5, 2026
One-click install
npx skills add https://github.com/SillyHippy/zo-skills --skill google-direct-oauth-sillyhippy
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: google-direct-oauth
Source: https://github.com/SillyHippy/zo-skills/tree/main/skills/zo-google-direct-oauth
Command: npx skills add https://github.com/SillyHippy/zo-skills --skill google-direct-oauth-sillyhippy

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires requests, google-auth, google-api-python-client, and includes scripts (resource) and references (resource) components.

What problem does it solve? Connecting AI agents to Google services usually requires third-party OAuth providers that sit between you and your data. This Skill lets you create your own OAuth client in Google Cloud Console and connect Calendar, Gmail, Drive, Docs, Sheets, and Contacts directly, with credentials stored locally on your machine. ## Core Features & Use Cases - Direct OAuth Setup: Guides you through creating a Google Cloud project, enabling APIs, configuring the consent screen, and generating OAuth credentials. - Automatic Token Refresh: A background daemon refreshes access tokens every 4 hours so sessions stay alive without re-authorization. - Python API Helpers: Provides ready-to-use functions like get_calendar_service() and get_gmail_service() for reading events, sending emails, and more. - Use Case: Ask your agent "What's on my calendar today?" or "Read my recent emails" and it queries the Google APIs directly using your own credentials. ## Quick Start Set up Google Direct OAuth with this credentials file, attaching the client secret JSON downloaded from Google Cloud Console.

Frequently Asked Questions about google-direct-oauth

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I connect Google Calendar and Gmail to an AI agent without third-party apps?▼

Create your own OAuth client in Google Cloud Console, enable the Calendar and Gmail APIs, then provide the downloaded client secret JSON to the setup script. The agent stores tokens locally and accesses the APIs directly.

How do I keep Google OAuth tokens from expiring?▼

Publish your app to Production mode in the OAuth consent screen so refresh tokens last 6 months instead of 7 days. The included refresh daemon renews the access token every 4 hours automatically.

Which Google APIs does this OAuth setup support?▼

The required APIs are Calendar, Gmail, Drive, People (Contacts), Docs, and Sheets. Optional APIs include Tasks, Chat, Classroom, Cloud Identity, and Keep, some of which require Google Workspace.

Why does Google OAuth show an access blocked or invalid redirect URI error?▼

Access blocked means your email is not added as a test user or the app is unpublished. Invalid redirect URI means the URI in Google Cloud Console does not exactly match the callback URL, including trailing slashes and protocol.

Where are Google OAuth credentials stored and how do I revoke access?▼

Credentials and tokens are stored locally in /home/.z/google-oauth/. To revoke, remove the app at myaccount.google.com/permissions and delete that directory.