123pan upload and share
简介
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、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 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
# 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
Required environment variables:
export PAN123_ACCESS_TOKEN="your_access_token"
export PAN123_DIRECT_FOLDER_ID="your_folder_id"
access_token: Get from https://www.123pan.com/dashboard/devfolder_id: The numeric ID of a folder with direct link enabled
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
- Get upload domain - Call
/upload/v2/file/domain to get upload server
- Upload file - POST to
/upload/v2/file/single/create (<1GB files)
- Create share link (default) - POST
/api/v1/share/create for short link
- 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)
python scripts/upload.py --file /path/to/file.txt --folder 30767843
Short Link (Default)
{
"success": true,
"file_id": 12345678,
"filename": "example.zip",
"size": 10485760,
"link": "https://www.123pan.com/s/xxxxx",
"link_type": "short_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
- Get upload domain - Call
/upload/v2/file/domain to get upload server
- Upload file - POST to
/upload/v2/file/single/create (<1GB files)
- Create share link (default) - POST
/api/v1/share/create for short link
- 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)
/upload/v2/file/domain to get upload server/upload/v2/file/single/create (<1GB files)/api/v1/share/create for short link/api/v1/direct-link/url?fileID={id}- 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
python scripts/upload_rclone.py --file /path/to/large/file --verify
# 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:
- Login to https://www.123pan.com
- Go to: Account → Third-party Mount → WebDAV Authorization
- Create an app to get server URL and password
- Update
~/.config/rclone/rclone.confwith your credentials
Note: WebDAV uploads may take 30-90 seconds to appear in API listings due to indexing delays.
- API details: references/api-reference.md
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。