聚石塔生成淘短链接口
名称 | 类型 | 是否必须 | 示例值 | 更多限制 | 描述 |
---|---|---|---|---|---|
need_https_prefix | Boolean | 可选 | true |
|
是否需要https前缀: true-要 false-不要 |
tag | String | 必须 | Test | 人群标签 | |
url | String | 必须 | https://m.taobao.com | 商品或者店铺的H5地址,只支持长链 | |
batch_number | String | 必须 | 1 | 批次号 |
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
r_code | String | 200 | 成功 |
r_success | Boolean | true | 成功 |
r_request_id | String | 111 | 请求ID |
module | String | https://s.tb.cn/Y9.X8sU | 短链值(短链的有效期为2个月) |
message | String | 短链生成服务出现异常 | 请求失败时的错误信息 |
1 2 3 4 5 6 7 8 | TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret); JstSmsMessageShorturlCreateRequest req = new JstSmsMessageShorturlCreateRequest(); req.setNeedHttpsPrefix( true ); req.setTag( "Test" ); req.setBatchNumber( "1" ); JstSmsMessageShorturlCreateResponse rsp = client.execute(req, sessionKey); System.out.println(rsp.getBody()); |
1 2 3 4 5 6 7 | < jst_sms_message_shorturl_create_response > < r_code >200</ r_code > < r_success >true</ r_success > < r_request_id >111</ r_request_id > < message >短链生成服务出现异常</ message > </ jst_sms_message_shorturl_create_response > |
1 2 3 4 5 6 | < error_response > < code >50</ code > < msg >Remote service error</ msg > < sub_code >isv.invalid-parameter</ sub_code > < sub_msg >非法参数</ sub_msg > </ error_response > |
错误码 | 错误描述 | 解决方案 |
---|