Install
openclaw skills install 123pan-uploadUpload 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.
openclaw skills install 123pan-uploadUpload files to 123云盘 and generate shareable links. Supports both short links (privacy-friendly) and direct download links.
Before using WebDAV/rclone features, read this:
Rclone Config Isolation (Important)
~/.config/rclone/rclone.conf# Create isolated config
rclone config --config ~/123pan-rclone.conf
# Use it with the skill
export RCLONE_CONFIG="$HOME/123pan-rclone.conf"
Credential Storage
.env file (add to .gitignore)Upload Timeouts
export PAN123_ACCESS_TOKEN="your_access_token"
export PAN123_DIRECT_FOLDER_ID="your_folder_id"
PAN123_ACCESS_TOKEN: Get from https://www.123pan.com/dashboard/devPAN123_DIRECT_FOLDER_ID: The numeric ID of a folder with direct link enabledexport PAN123_WEBDAV_USER="your_webdav_username"
export PAN123_WEBDAV_PASS="your_webdav_password"
export RCLONE_BIN="/path/to/rclone" # Optional, defaults to system PATH
export RCLONE_CONFIG="$HOME/123pan-rclone.conf" # Recommended for isolation
# This creates a config file that only contains 123pan
rclone config --config ~/123pan-rclone.conf
# Follow prompts to add "123pan-webdav" remote
# Export the config path
export RCLONE_CONFIG="$HOME/123pan-rclone.conf"
# 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
Returns privacy-friendly short link:
python scripts/upload.py --file /path/to/file.txt
# Output: https://www.123pan.com/s/xxxxx
Returns direct download link (contains user ID in URL):
python scripts/upload.py --file /path/to/file.txt --short-link=false
python scripts/upload.py --file /path/to/file.txt --folder 30767843
{
"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"
}
/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-link): Privacy-friendly format, no user ID exposed in URLFor files larger than 10GB, use WebDAV instead:
# Set up environment first
export PAN123_WEBDAV_USER="your_user"
export PAN123_WEBDAV_PASS="your_pass"
export RCLONE_CONFIG="$HOME/123pan-rclone.conf" # Isolated config
python scripts/upload_rclone.py --file /path/to/large/file --verify
export PAN123_ACCESS_TOKEN="your_token"
export PAN123_WEBDAV_USER="your_user"
export PAN123_WEBDAV_PASS="your_pass"
export RCLONE_CONFIG="$HOME/123pan-rclone.conf"
# 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
Note: WebDAV uploads may take 30-90 seconds to appear in API listings due to indexing delays.