Retrieve password SMS verificationThe project to modify the password need mobile phone message verification, because Ali big fish texting fast, stable, so decided to use Ali big fish. Nonsense not to say, the steps are as follows: 1. First login to Ali Big Fish official website, registered as a developer. (http://www.alidayu.com/?utm_content=m_2931?utm_content=m_2931?utm_content=m_2931?utm_content=m_2931) 2. See Ali Big Fish API Documentation (HTTP://OPEN.TAOBAO.COM/DOC2/APIDETAIL?SPM=0.0.0.0.D1PYJD&APIID=25450) 3. Download Ali Big Fish Jar Pack 4. Start the development code as follows:
Official website URL
String url= "Http://gw.api.taobao.com/router/rest";
Become a developer, create the application after the system automatically generates
String appkey= "23300902";
String secret= "24c5befb62bed7917bf139b7d39d251d";
SMS template content
String json= "{\" code\ ": \" 1234\ ", \" product\ ": \" So-and-so e-commerce authentication \ "}";
Taobaoclient client = new Defaulttaobaoclient (URL, Appkey, secret);
Alibabaaliqinfcsmsnumsendrequest req = new Alibabaaliqinfcsmsnumsendrequest ();
Req.setextend ("123456");
Req.setsmstype ("normal");
Req.setsmsfreesignname ("Change Verification");
Req.setsmsparamstring (JSON);
Req.setrecnum (tel);
Req.setsmstemplatecode ("sms_4720619");
try {
Alibabaaliqinfcsmsnumsendresponse RSP = Client.execute (req);
System.out.println (Rsp.getbody ());
return 1;
} catch (Exception e) {
//Todo:handle Exception
return-1;
}
Borrow other people's platform, it is necessary to carefully look at its official website API, this is the required skills, but also less detours. The Conscience evaluation Ali API is very easy to understand, but also is not completely detailed, do not know the Internet Baidu, you can not ask others to write very detailed. You can only follow the rules, or you will be the one who makes the rules.