微算力 · API 导航与自营网关
API 接入 EN
未登录登录
✨

123pan upload and share

123pan upload and share · v1.0.1
安全 unknown 级 作者 solarise94 公开目录收录
948 下载 0 安装 3.9k 收藏 1 浏览

简介

123pan upload and share

原始描述

Upload files to 123pan (123云盘) and generate shareable links. Use when users need to upload files to 123pan and get links for sharing. Supports short share li...

通过你的 Agent 添加

安装目录:123pan-upload/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。

点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。

或者手动安装

Claude Code~/.claude/skills/123pan-upload-and-share/
Codex CLI~/.codex/skills/123pan-upload-and-share/
DeepSeek Harness~/.agents/skills/123pan-upload-and-share/

包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可; 目录名不用换,也不要把包直接解压到 skills 根目录。 技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。

技能正文


name: 123pan-upload description: Upload files to 123pan (123云盘) and generate shareable links. Use when users need to upload files to 123pan and get links for sharing. Supports short share links (privacy-friendly) or direct download links. Works with small files (under 1GB) via single-step upload.

123pan-upload

Upload files to 123云盘 and generate shareable links. Supports both short links (privacy-friendly) and direct download links.

Quick Start

# Default: returns short share link (recommended)
python scripts/upload.py --file /path/to/file

# Get direct link instead
python scripts/upload.py --file /path/to/file --short-link=false

Configuration

Required environment variables:

export PAN123_ACCESS_TOKEN="your_access_token"
export PAN123_DIRECT_FOLDER_ID="your_folder_id"

Usage

Default (Short Link)

Returns privacy-friendly short link:

python scripts/upload.py --file /path/to/file.txt
# Output: https://www.123pan.com/s/xxxxx

Direct Link (Long URL)

Returns direct download link (contains user ID in URL):

python scripts/upload.py --file /path/to/file.txt --short-link=false

Specify Target Folder

python scripts/upload.py --file /path/to/file.txt --folder 30767843

Output Format

Short Link (Default)

{
  "success": true,
  "file_id": 12345678,
  "filename": "example.zip",
  "size": 10485760,
  "link": "https://www.123pan.com/s/xxxxx",
  "link_type": "short_link"
}

Direct Link

{
  "success": true,
  "file_id": 12345678,
  "filename": "example.zip",
  "size": 10485760,
  "link": "https://xxx.v.123pan.cn/xxx/xxx/example.zip",
  "link_type": "direct_link"
}

API Workflow

  1. Get upload domain - Call /upload/v2/file/domain to get upload server
  2. Upload file - POST to /upload/v2/file/single/create (<1GB files)
  3. Create share link (default) - POST /api/v1/share/create for short link
  4. Get direct link (optional) - GET /api/v1/direct-link/url?fileID={id}

Privacy Note

  • Short links (--short-link): Privacy-friendly format, no user ID exposed in URL
  • Direct links: Contain user ID and full path, less private but allows direct download

Limitations

  • Single upload limit: 1GB per file for single-step upload
  • Chunked upload supports up to 10GB per file (API limit)
  • Requires folder with direct link enabled

Large Files (>10GB)

For files larger than 10GB, use WebDAV instead:

Option 1: Simple WebDAV Upload

python scripts/upload_rclone.py --file /path/to/large/file --verify

Option 2: WebDAV Upload + Auto Link Generation

# Upload via WebDAV, then use API to find file and generate direct link
python scripts/upload_webdav_link.py --file /path/to/large/file

# Generate share link instead
python scripts/upload_webdav_link.py --file /path/to/large/file --link-type share

WebDAV requires separate authorization from 123pan web interface:

  1. Login to https://www.123pan.com
  2. Go to: Account → Third-party Mount → WebDAV Authorization
  3. Create an app to get server URL and password
  4. Update ~/.config/rclone/rclone.conf with your credentials

Note: WebDAV uploads may take 30-90 seconds to appear in API listings due to indexing delays.

正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。

标签

没有标签

同类 Skill