外部调用短链接生成接口
接口地址: /v1/shorten
1. GET 方式调用
GET /v1/shorten?url=https://example.com&expires_days=7
参数说明:url 必填,expires_days 可选(过期天数)
2. POST 方式调用
POST /v1/shorten
Content-Type: application/json
{
"url": "https://example.com",
"expires_days": 7
}
参数说明:url 必填,expires_days 可选(过期天数)
返回格式
{
"code": 200,
"msg": "success",
"data": {
"short_url": "https://u.muvocal.com/abc123",
"short_code": "abc123",
"original_url": "https://example.com",
"expires_at": "2026-04-21T09:00:00"
}
}