生成短链接

最后更新:2026/7/2

企业可通过此接口将长链接生成短链接

请求方式: POST(HTTPS)

请求地址: https://open.wshoto.com/openapi/qrcode/generate_short_link?access_token=x

Query参数:

参数 类型 必填 说明
access_token string 调用接口凭证

Body参数:

{
  "url": "https://example.com/path?a=1&b=2",
  "url_encode": false
}
参数 类型 必填 说明
url string 需要生成短链接的长链接
url_encode bool 是否需要先对长链接进行编码,默认false;一般传false

返回值:

{
  "code": 0,
  "msg": "请求成功",
  "data": {
    "short_link": "https://wsurl.cc/xxxxxx"
  },
  "sub_code": "00000"
}

参数说明:

参数 类型 说明
code int 返回码
msg string 对返回码的文本描述内容
data obj 返回对象
short_link string 生成后的短链接
sub_code string 业务服务返回码

results matching ""

    No results matching ""