返回顶部
p

pdauthPDAuth动态授权

Dynamic OAuth for AI agents via Pipedream. Generate OAuth links for 2500+ APIs, let users authorize, then call MCP tools on their behalf.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
1,723
下载量
免费
免费
1
收藏
概述
安装方式
版本历史

pdauth

pdauth — AI代理的动态OAuth

使用pdauth让您(代理)通过OAuth访问2500+个API。流程如下:

  1. 1. 代理需要访问某个应用(Spotify、Slack、Notion等)
  2. 使用pdauth connect <应用>生成OAuth链接
  3. 将链接分享给用户 → 用户点击并授权
  4. 代理现在可以通过pdauth call <应用.工具>调用工具

快速参考

bash

配置(一次性设置)


pdauth config

搜索应用

pdauth apps --search spotify

生成OAuth链接

pdauth connect spotify --user 用户ID

检查已连接的应用

pdauth status --user 用户ID

列出可用工具

pdauth tools spotify --user 用户ID

调用工具

pdauth call spotify.getmyplaylists --user 用户ID pdauth call slack.send_message channel=general text=Hello!

OAuth流程(如何请求访问权限)

当您需要访问用户尚未授权的应用时:

  1. 1. 运行:pdauth connect <应用> --user <用户ID>
  2. 从输出中获取OAuth链接
  3. 将链接发送给用户:要执行此操作,我需要访问<应用>。点击此处授权:<链接>
  4. 用户点击,通过Pipedream授权
  5. 确认:pdauth status --user <用户ID>
  6. 现在您可以调用工具了!

用户ID策略

为每个用户使用一致的标识符:

  • - Telegram:telegram:5439689035
  • 邮箱:pedro@example.com
  • 自定义:pedro-mainframe

跨会话使用相同的用户ID可以保持其已连接的账户。

调用工具

bash

格式:pdauth call <应用>.<工具名称> [键=值 ...]

简单参数

pdauth call slack.send_message channel=general text=Hello

复杂数据的JSON参数

pdauth call notion.create_page --args {title: 我的页面, content: ...}

获取JSON输出以便解析

pdauth call spotify.getmyplaylists --json

检查状态

bash

查看用户已连接的内容


pdauth status --user pedro

查看所有用户

pdauth status --all

用于脚本的JSON格式

pdauth status --user pedro --json

热门应用

浏览全部应用请访问 https://mcp.pipedream.com

应用标识符示例工具
Slackslacksendmessage, listchannels
Spotify
spotify | getmyplaylists, addtoplaylist |
| Notion | notion | createpage, querydatabase |
| Google Sheets | googlesheets | getvalues, update_values |
| Gmail | gmail | sendemail, listmessages |
| GitHub | github | createissue, listrepos |
| Linear | linear | createissue, listissues |
| Airtable | airtable | listrecords, createrecord |

错误处理

应用未连接 → 使用pdauth connect生成链接,让用户授权

未找到工具 → 使用pdauth tools <应用>列出可用工具

凭据无效 → 运行pdauth config设置Pipedream凭据

提示

  1. 1. 在尝试调用工具前始终先检查状态
  2. 使用一致的用户ID以便连接跨会话持久保存
  3. JSON输出(--json)最适合以编程方式解析结果
  4. 链接过期 — OAuth链接4小时后过期,根据需要生成新的链接

示例工作流程

用户:将Bohemian Rhapsody添加到我的Spotify播放列表

代理:

  1. 1. pdauth status --user telegram:5439689035 --json

→ 无Spotify连接

  1. 2. pdauth connect spotify --user telegram:5439689035
→ 获取OAuth链接
  1. 3. 发送给用户:我需要Spotify访问权限。点击此处:<链接>
  1. 4. 用户授权
  1. 5. pdauth status --user telegram:5439689035
→ Spotify ✓ 已连接
  1. 6. pdauth call spotify.search_tracks query=Bohemian Rhapsody --json
→ 获取曲目ID
  1. 7. pdauth call spotify.addtoplaylist playlistid=... trackid=...
→ 完成!
  1. 8. 回复:已将Bohemian Rhapsody添加到您的播放列表!🎵

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 pdauth-1776365287 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 pdauth-1776365287 技能

通过命令行安装

skillhub install pdauth-1776365287

下载

⬇ 下载 pdauth v1.0.0(免费)

文件大小: 2.36 KB | 发布时间: 2026-4-17 15:20

v1.0.0 最新 2026-4-17 15:20
Initial release of pdauth — Dynamic OAuth for AI agents

- Enables AI agents to generate OAuth links for 2500+ APIs using Pipedream and authorize users.
- Provides commands to connect apps, check user connection status, list tools, and call API tools on behalf of users.
- Supports popular apps (Slack, Spotify, Notion, Google Sheets, Gmail, GitHub, etc.) with simple CLI commands.
- Offers a workflow for user authorization and clear strategies for managing user identities.
- Includes error handling guidance and usage tips for seamless integration.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部