← 返回
开发者工具 Key 中文

uf2.net URL Shortener

Create, manage, and track custom short URLs with uf2.net API; links never expire and provide click counts and public stats via simple REST calls.
使用 uf2.net API 创建、管理和追踪自定义短链接;链接永不过期,提供点击数和公开统计,简易 REST 调用即可获取。
setdemos
开发者工具 clawhub v1.0.1 1 版本 99885.8 Key: 需要
★ 0
Stars
📥 875
下载
💾 4
安装
1
版本
#latest#redirection#seo#url#url shortener#url shortening

概述

uf2.net URL Shortener

Create and manage short URLs via the uf2.net API. This skill provides a CLI wrapper for the uf2.net service (https://uf2.net), an API-first URL shortener designed for automation and bots.

Quick Start

1. Register for API Key

If you don't have a uf2.net account:

curl -X POST https://uf2.net/api/v1/accounts/register \
  -H "Content-Type: application/json" \
  -d '{"username":"your-username"}'

Response includes api_key field. Store this securely (see Credential Management below).

2. Set Environment Variable

export UF2_API_KEY="uf2_..."

Important: Do not hardcode API keys in scripts or commit them to version control.

3. Common Operations

Shorten a URL:

scripts/uf2.sh create "https://example.com/long/path"
# → {"short_url":"https://uf2.net/abc123",...}

Custom slug:

scripts/uf2.sh create "https://github.com/my-repo" "my-repo" "My GitHub Repo"
# → {"short_url":"https://uf2.net/my-repo",...}

List your links:

scripts/uf2.sh list 10
# → {"links":[...],"total":42}

Get link stats (public, no auth needed):

scripts/uf2.sh get abc123
# → {"code":"abc123","click_count":42,...}

Delete a link:

scripts/uf2.sh delete abc123

Credential Management

Recommended: Environment Variables

Most secure for temporary/session use:

export UF2_API_KEY="uf2_..."

For Persistent Storage

Choose one based on your security requirements:

Option 1: Shell profile (user-only access)

echo 'export UF2_API_KEY="uf2_..."' >> ~/.zshrc
# or ~/.bashrc for bash

Option 2: OpenClaw secret store (if available)

# Store in OpenClaw's secure credential storage
# (consult OpenClaw docs for secret management)

Option 3: System keychain/credential manager

# macOS Keychain, Linux Secret Service, Windows Credential Manager
# Use OS-native secure storage

⚠️ Avoid: Storing keys in plain text files in shared or version-controlled directories.

Direct API Usage

For operations not covered by the script, use curl directly. See api.md for full API reference.

Example:

curl -X POST https://uf2.net/api/v1/links \
  -H "X-API-Key: $UF2_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com","slug":"custom"}'

Service Details

  • Service: uf2.net (https://uf2.net)
  • Type: API-first URL shortener for bots and engineers
  • TLS: Yes (HTTPS only)
  • API Docs: https://uf2.net/docs (Swagger), https://uf2.net/redoc (ReDoc)
  • Registration: Open, free tier available
  • Rate Limits: 20 registrations per IP per hour; reasonable use for authenticated endpoints

Key Features

  • Never expires - Links remain active indefinitely
  • Custom slugs - Brand your short URLs (4-64 chars, lowercase a-z0-9_-)
  • Click tracking - Monitor usage via click_count
  • Public metadata - Anyone can view link stats (GET /links/{code})
  • Simple API - RESTful with JSON responses

Constraints

  • Max URL length: 2048 characters
  • Custom slugs are case-insensitive (stored lowercase)
  • Slug conflicts return 409 error
  • Private/localhost URLs rejected
  • Registration rate limit: 20 per IP per hour

Security Notes

  • API key required: All authenticated operations require UF2_API_KEY header
  • Link visibility: All created links are publicly accessible (anyone with the short URL can access the target)
  • Metadata visibility: Link metadata (click counts, original URL) is publicly readable
  • No link expiration: Links persist indefinitely unless manually deleted
  • Private URL rejection: The service rejects localhost and private IP ranges

Resources

  • Script: scripts/uf2.sh - CLI wrapper for common operations
  • Reference: references/api.md - Full API documentation
  • Service homepage: https://uf2.net
  • API docs: https://uf2.net/docs (Swagger), https://uf2.net/redoc (ReDoc)

版本历史

共 1 个版本

  • v1.0.1 当前
    2026-03-29 21:44 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

Picrd Image Hosting

setdemos
免费图片托管(picrd.com),上传截图、图表和图片即可获取永久可嵌入的URL,无需注册账户,支持 PNG、JPEG 等格式。
★ 0 📥 389
developer-tools

Gog

steipete
Google Workspace 命令行工具,支持 Gmail、日历、云端硬盘、通讯录、表格和文档。
★ 921 📥 185,801
developer-tools

CodeConductor.ai

larsonreever
AI驱动平台,提供快速全栈开发、智能体、工作流自动化及低代码AI集成的可扩展产品创建。
★ 68 📥 180,189