发送第一条测试短信 Test Sms
1. 阿里大于SDK短信API调用代码示例
1.1 请求参数
1.2 开发者请求示例
import com.taobao.api.DefaultTaobaoClient;
import com.taobao.api.request.AlibabaAliqinFcSmsNumSendRequest;
import com.taobao.api.request.AlibabaAliqinFcSmsNumSendResponse;
TaobaoClient client = new DefaultTaobaoClient(url, "your_app_key", "your_app_secret");
AlibabaAliqinFcSmsNumSendRequest req = new AlibabaAliqinFcSmsNumSendRequest();
req.setExtend("123456");
req.setSmsType("normal");
req.setSmsFreeSignName("阿里大于");
req.setSmsParamString("{\"code\":\"888888\",\"product\":\"阿里大于(http://www.alidayu.com)\",\"item\":\"阿里大于\"}");
req.setRecNum("13000000000");
req.setSmsTemplateCode("SMS_585014");
AlibabaAliqinFcSmsNumSendResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
include "alidayu-openapi-php-sdk/TopSdk.php";
$c = new TopClient;
$c->appkey = "your_app_key";
$c->secretKey = "your_app_secret";
$req = new AlibabaAliqinFcSmsNumSendRequest;
$req->setExtend("123456");
$req->setSmsType("normal");
$req->setSmsFreeSignName("阿里大于");
$req->setSmsParam("{\"code\": \"888888\", \"product\": \"阿里大于(http://www.alidayu.com)\"}");
$req->setRecNum("your_phone_number");
$req->setSmsTemplateCode("SMS_645006");
$resp = $c->execute($req);
1.3 阿里大于服务端返回示例
{
"alibaba_aliqin_fc_sms_num_send_response":{
"result":{
"err_code":"0",
"model":"134523^4351232",
"success":false,
"msg":"成功"
}
}
}
{
"error_response":{
"code":50,
"msg":"Remote service error",
"sub_code":"isv.invalid-parameter",
"sub_msg":"非法参数"
}
}
1.4 错误码解释
1.5 常用开发工具