请求URL:
https://wechaturl.us/api/Long2ShortUrl.json?appid=37****15&appkey=a50d38748960******80ae1a725b7c95&entry_type=wechaturl&url=http://www.baidu.com
请求方式:
POST 或者GET(如果用GET,特殊字符串需要url编码)
SDK
参数:
参数名 | 必选 | 类型 | 说明 |
appid | 是 | int | http://www.wechaturl.us/user/index.html 去免费获取appid |
appkey | 是 | string | http://www.wechaturl.us/user/index.html 去免费获取appkey |
entry_type | 是 | string | 默认wechaturl;目前支持['wechaturl','sohuurl','ueeurl','weibourl','tencent_weibourl','is_gd_url','maa_la','soso_bz'];这些类型可以到https://wechaturl.gitbook.io/wechaturl/the-third-shorturl 查看解释 |
url | 是 | string | 输入http(s)://开头的网址 |
返回示例
{"code": 1,"message": "ok;目前支持[wechaturl,sohuurl,ueeurl,weibourl,tencent_weibourl,is_gd_url],默认情况会使用wechaturl;详细请到https://wechaturl.gitbook.io/wechaturl/the-third-shorturl了解","data": {"entry_type": "wechaturl","code": 1,"message": "success","shorturl": "https://w.url.cn/s/ASneng8?_wv=2",#这个就是你想到的短网址"longurl": "https://yourdomain.com/anyurl?any_get=any_value#any_front","data": { #这个节点是第三方返回的原始数据"code": 0,"short_url": "https://w.url.cn/s/ASneng8"}}}
重要:由于腾讯升级,导致微信短网址只能在手机设备上打开,建议你切换到其他