← 返回主页

🔗 短链接 API 测试工具

💡 提示:这个工具可以帮你测试短链接 API。创建短链接无需密码,查看列表和删除操作需要管理密码。

⚙️ 配置

创建短链接

获取短链接列表

删除短链接

创建短链接 - cURL

curl -X POST https://short.rakin.cn/api/create \ -H "Content-Type: application/json" \ -d '{"url":"https://example.com/long/url","customCode":"mylink"}'

创建短链接 - JavaScript

const response = await fetch('https://short.rakin.cn/api/create', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ url: 'https://example.com/long/url', customCode: 'mylink' }) }); const data = await response.json(); console.log('短链接:', data.shortUrl);

创建短链接 - Python

import requests response = requests.post( 'https://short.rakin.cn/api/create', headers={'Content-Type': 'application/json'}, json={ 'url': 'https://example.com/long/url', 'customCode': 'mylink' } ) data = response.json() print(f"短链接: {data['shortUrl']}")

获取列表 - cURL (需要密码)

curl -X GET https://short.rakin.cn/api/list \ -H "Authorization: Bearer Abc.147258"

删除短链接 - cURL (需要密码)

curl -X DELETE https://short.rakin.cn/api/delete/abc123 \ -H "Authorization: Bearer Abc.147258"