import com.taobao.api.DefaultTaobaoClient;import com.taobao.api.TaobaoClient;import com.taobao.api.request.AlibabaAliqinFcFlowChargeProvinceRequest;import com.taobao.api.request.AlibabaAliqinFcSmsNumSendRequest;import com.taobao.api.response.AlibabaAliqinFcSmsNumSendResponse;
public
class
ceshi {
public
static
void main(String[] args) {
String url =
""
;
String appkey =
"23859907"
;
String secret =
"3249c3b6a29aee38a6c9c63a9093a314"
;
TaobaoClient client =
new
DefaultTaobaoClient(url, appkey, secret);
AlibabaAliqinFcSmsNumSendRequest req =
new
AlibabaAliqinFcSmsNumSendRequest();
req.setExtend(
"123456"
);
req.setSmsType(
"normal"
);
req.setSmsFreeSignName(
"羽品测试"
);
req.setRecNum(
"15387108387"
);
req.setSmsTemplateCode(
"自己的模板ID"
);
AlibabaAliqinFcSmsNumSendResponse res =
new
AlibabaAliqinFcSmsNumSendResponse();
System.out.println(res.getBody());*
String secret =
"3249c3b6a29aee38a6c9c63a9093a314"
;
String number =
"520"
;
TaobaoClient client =
new
DefaultTaobaoClient(url, appkey, secret);
AlibabaAliqinFcSmsNumSendRequest req =
new
AlibabaAliqinFcSmsNumSendRequest();
req.setExtend(
"123456"
);
req.setSmsType(
"normal"
);
req.setSmsFreeSignName(
"羽品测试"
);
req.setSmsParamString(
"{\"number\":\"1234\"}"
);
req.setRecNum(
"15387108387"
);
req.setSmsTemplateCode(
"SMS_67785100"
);
try
{
AlibabaAliqinFcSmsNumSendResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
rusult = rsp.getSubMsg();
}
catch
(Exception e) {
e.printStackTrace();
}
System.out.println(rusult);
}
// 官网的URL
}