跳至主要内容
小龙虾小龙虾AI
🤖

Skill

Get delegated access for AI agents via TapAuth — the trust layer between humans and AI agents. Use when your agent needs to access GitHub, Google Workspace,...

下载188
星标0
版本1.2.0
安全合规
安全通过
🔗API

技能说明


name: tapauth description: >- Get OAuth tokens for AI agents via TapAuth — the trust layer between humans and AI agents. Use when your agent needs to access GitHub, Google Workspace, Gmail, Linear, or other OAuth providers on behalf of a user. One API call to create an auth request, user approves in browser, agent gets scoped tokens. No API key required. license: MIT compatibility: Requires curl or any HTTP client. Works with Claude Code, Cursor, OpenClaw, Codex, GitHub Copilot, and any agent with HTTP access. metadata: author: tapauth version: "1.0" website: https://tapauth.ai docs: https://tapauth.ai/docs

TapAuth — OAuth Token Broker for AI Agents

TapAuth lets your agent get OAuth tokens from users without handling credentials directly. The user approves in their browser. You get a scoped token. That's it.

The Flow (3 steps)

Step 1: Create a Grant

curl -X POST https://tapauth.ai/api/grants \
  -H "Content-Type: application/json" \
  -d '{
    "provider": "github",
    "scopes": ["repo", "read:user"],
    "agent_name": "My Agent"
  }'

Response:

{
  "id": "grant_abc123",
  "grant_secret": "gs_live_xxxx",
  "approval_url": "https://tapauth.ai/approve/grant_abc123",
  "status": "pending",
  "expires_at": "2026-02-14T16:10:00Z"
}

Important: Save grant_secret — you need it to retrieve the token. It's only returned once.

Step 2: User Approves

Show the user the approval_url. They'll see:

  • Which agent is requesting access
  • Which provider and scopes
  • Options: approve with full scopes, read-only, or time-limited (1hr/24hr/7d/forever)

The approval URL expires after 10 minutes. Create a new grant if it expires.

Step 3: Retrieve the Token

Poll until the user approves:

curl -X POST https://tapauth.ai/api/grants/grant_abc123/token \
  -H "Content-Type: application/json" \
  -d '{"grant_secret": "gs_live_xxxx"}'
StatusHTTPMeaning
pending202User hasn't approved yet. Poll again in 2-5 seconds.
approved200Token returned in response body.
denied410User denied the request.
revoked410User revoked access after approving.
link_expired410Approval URL expired (10 min). Create a new grant.

On 200, the response includes:

{
  "access_token": "gho_xxxx",
  "token_type": "bearer",
  "scope": "repo,read:user",
  "provider": "github"
}

Quick Reference

WhatEndpointMethod
Create grant/api/grantsPOST
Get token/api/grants/{id}/tokenPOST

No API key needed. No signup needed. The user's approval is the only gate.

Supported Providers

See the references/ directory for provider-specific scopes, examples, and gotchas:

  • GitHubreferences/github.md — repos, issues, PRs, user data
  • Googlereferences/google.md — Gmail, Drive, Calendar, Sheets, Docs, Contacts (all scopes)
  • Gmailreferences/gmail.md — read, send, manage emails (uses google provider)
  • Google Drivereferences/google_drive.md — focused Drive-only access
  • Google Contactsreferences/google_contacts.md — view and manage contacts
  • Google Sheetsreferences/google_sheets.md — read and write spreadsheets
  • Google Docsreferences/google_docs.md — read and write documents
  • Linearreferences/linear.md — issues, projects, teams
  • Vercelreferences/vercel.md — deployments, projects, env vars, domains
  • Notionreferences/notion.md — pages, databases, search
  • Slackreferences/slack.md — channels, messages, users, files
  • Sentryreferences/sentry.md — error tracking, projects, organizations
  • Asanareferences/asana.md — tasks, projects, workspaces

Tip: The focused Google providers (google_drive, google_sheets, etc.) show simpler consent screens. Use them when you only need one Google service. Use google when you need multiple services.

Helper Script

For a complete grant-creation + polling flow, use the bundled script:

./scripts/tapauth.sh github "repo,read:user" "My Agent"

It creates the grant, prints the approval URL, polls for the token, and outputs it when ready.

Common Patterns

Ask the user to approve, then proceed

1. Create grant for the provider/scopes you need
2. Tell the user: "Please approve access at: {approval_url}"
3. Poll /api/grants/{id}/token every 3 seconds
4. Once approved, use the token for API calls

Handle expiry gracefully

If you get link_expired (410), just create a new grant and ask the user again. If you get revoked, the user withdrew access — don't retry.

Scope selection

Request the minimum scopes you need. Users see exactly what you're asking for and can approve with reduced permissions. Less scope = more trust = higher approval rate.

如何使用「Skill」?

  1. 打开小龙虾AI(Web 或 iOS App)
  2. 点击上方「立即使用」按钮,或在对话框中输入任务描述
  3. 小龙虾AI 会自动匹配并调用「Skill」技能完成任务
  4. 结果即时呈现,支持继续对话优化

相关技能