本文主要是介绍阿里大鱼发送短信,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
String rusult = null;// 官网的URLString url = "http://gw.api.taobao.com/router/rest";// 成为开发者,创建应用后系统自动生成String appkey = "23782365";String secret = "513ff7666b4818f627874be3532e980b";int code = Math.abs(new Random().nextInt(899999) + 100000);TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);AlibabaAliqinFcSmsNumSendRequest req = new AlibabaAliqinFcSmsNumSendRequest();
// req.setExtend("1234");req.setSmsType("normal");req.setSmsFreeSignName("");req.setSmsParamString("{\"code\":\""+code+"\"}");req.setRecNum("");req.setSmsTemplateCode("");try {AlibabaAliqinFcSmsNumSendResponse rsp = client.execute(req);System.out.println(rsp.getBody()); rusult = rsp.getSubMsg();} catch (Exception e) {e.printStackTrace();}System.out.println(rusult);
这篇关于阿里大鱼发送短信的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!