Token导航 LogoToken导航TokenDH.com
研究检索敏感数据clawhub未标认证来源可访问clear审计提醒

gmail-oauthGmail OAuth 搜索

Agent Skill

用于辅助安全审计、权限检查、凭据风险、认证流程和常见漏洞排查。它适合让 Agent 梳理敏感配置、检查依赖风险、分析鉴权逻辑或生成安全复核清单。使用时不能把工具输出直接当最终结论,涉及密钥、令牌、用户数据或生产系统时,应先确认最小权限、脱敏方式和操作边界。

总安装

128,177

周安装

5,236

GitHub Stars

7

下载量

41,469
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:gmail-oauth(Gmail OAuth 搜索)
来源仓库:https://github.com/kai-jar/gmail-oauth
安装命令:
openclaw skills install gmail-oauth
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install gmail-oauth

简介

通过 gog CLI 使用手动 OAuth 流程设置 Gmail API 访问。在设置 Gmail 集成、续订过期的 OAuth 令牌或对无头服务器上的 Gmail 身份验证进行故障排除时使用。

SKILL.md

name
gmail-oauth
description
Set up Gmail API access via gog CLI with manual OAuth flow. Use when setting up Gmail integration, renewing expired OAuth tokens, or troubleshooting Gmail authentication on headless servers.

Gmail OAuth Setup

Headless-friendly OAuth flow for Gmail API access using gog CLI.

Prerequisites

  • gog CLI installed (brew install steipete/tap/gogcli)
  • Google Cloud project with OAuth credentials (Desktop app type)
  • Gmail API enabled in the project

Quick Setup

1. Create Google Cloud Project & Credentials

  1. Go to https://console.cloud.google.com
  2. Create a new project (or select existing)
  3. Enable Gmail API: APIs & Services → Library → search "Gmail API" → Enable
  4. Configure OAuth consent screen: APIs & Services → OAuth consent screen

- Choose "External" user type - Fill in app name, user support email - Add scopes: gmail.modify (or others as needed) - Important: Click "PUBLISH APP" for permanent tokens (see Troubleshooting)

  1. Create credentials: APIs & Services → Credentials → Create Credentials → OAuth client ID

- Application type: Desktop app - Download the JSON file

2. Configure gog

gog auth credentials /path/to/client_secret.json
gog auth keyring file  # Use file-based keyring for headless
export GOG_KEYRING_PASSWORD="your-password"  # Add to .bashrc

3. Run Auth Flow

Run scripts/gmail-auth.sh interactively, or:

# Generate URL
scripts/gmail-auth.sh --url

# User opens URL, approves, copies code from localhost redirect
# Exchange code (do this quickly - codes expire in minutes!)
scripts/gmail-auth.sh --exchange CODE EMAIL

4. Verify

gog gmail search 'is:unread' --max 5 --account you@gmail.com

Troubleshooting

"Access blocked: [app] has not completed the Google verification process"

Cause: App is in "Testing" mode and the Gmail account isn't a test user.

Solutions (choose one):

  1. Publish the app (recommended):

- Google Cloud Console → APIs & Services → OAuth consent screen - Click "PUBLISH APP" → Confirm - No Google review needed for personal use - Tokens become permanent

  1. Add test user:

- OAuth consent screen → Test users → + ADD USERS - Add the Gmail address you're authorizing - Tokens still expire in 7 days

"Google hasn't verified this app" warning screen

This is normal for personal apps. Click:

  1. Advanced (bottom left)
  2. Go to [app name] (unsafe)

Safe to proceed since you own the app.

Token expires in 7 days

Cause: App is in "Testing" mode.

Fix: Publish the app (see above). Published apps get permanent refresh tokens.

"invalid_request" or "invalid_grant" errors

Causes:

  • Authorization code expired (they only last a few minutes)
  • Code was already used
  • Redirect URI mismatch

Fix: Generate a fresh auth URL and complete the flow quickly. Paste the code immediately after getting it.

"redirect_uri_mismatch" error

Cause: The redirect URI in the token exchange doesn't match what was used in the auth URL.

Fix: This script uses http://localhost. Make sure both the auth URL and exchange use the same redirect URI.

Page hangs after approving permissions (mobile)

Cause: Browser trying to connect to localhost which doesn't exist on phone.

Fix:

  • Use a desktop browser instead
  • Or tap the address bar while it's "hanging" - the URL contains the code
  • The URL will look like: http://localhost/?code=4/0ABC...

Multiple permission checkboxes causing hangs

Cause: Too many OAuth scopes requested.

Fix: Use minimal scopes. gmail.modify alone is usually sufficient and shows just one permission.

Can't find project in Google Cloud Console

Cause: Signed into wrong Google account.

Fix: Check which account owns the project:

  • Click profile icon (top right)
  • Switch accounts
  • Check project dropdown for each account

"invalid_request" with oob redirect (new projects)

Cause: Google deprecated urn:ietf:wg:oauth:2.0:oob for OAuth clients created after 2022.

Fix: Use http://localhost redirect instead (this script's default). After approval, browser redirects to localhost with code in URL.

Scopes Reference

ScopeAccess
gmail.modifyRead, send, delete, manage labels (recommended)
gmail.readonlyRead only
gmail.sendSend only
gmail.composeCreate drafts, send

Files

  • scripts/gmail-auth.sh — Interactive auth helper

Tips

  • Publish your app — Avoids test user limits and 7-day token expiry
  • Exchange codes quickly — They expire in minutes
  • Use desktop browser — Mobile browsers can be finicky with localhost redirects
  • One scope is enoughgmail.modify covers most use cases

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

95.97%
按下载量换算39,798

安全审计

VirusTotal

通过

ClawScan

可疑

Static analysis

未展示

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills