http://ip:port/inter/sendSingleIMS
| 参数 | 类型 | 描述 |
|---|---|---|
| appId | String | 用户Appid(必填) |
| timestamp | String | 时间戳(必填) 格式:yyyyMMddHHmmss 14位 |
| sign | String | 签名(必填) 格式:md5(appId+ secretKey + timestamp) 32位 |
| mobile | String | 手机号(必填) 1个 |
| content | String | 短信内容(必填) |
| customImsId | String | 自定义消息ID(选填) 最长32位 |
1、将参数拼装成json串
{
"appId":"EUCP-EMY-SMS0-4SYGK",
" timestamp":" 20180330161138",
" sign":" PIEUDJI987EUID62PKEDSESQEDSEDFSE",
"mobile":" 0061422118000",
"content":" This is a text message to Australia",
"customImsId":"2018010709302911"
}
2、将json串转化为UTF-8编码的byte数组
Byte[] data = json.toBytes[“UTF-8”];
3、通过http post方法传输
Byte[] response = http.post(url,data);
响应数据格式为Json
| 参数 | 类型 | 描述 |
|---|---|---|
| code | String | 请求状态码,详见本文档《3.接口状态码表》 当code不是SUCCESS时,不会响应下面参数数据。 |
| mobile | String | 手机号 |
| imsId | String | 消息ID |
| customImsId | String | 客户自定义IMSID |
{
"code":"SUCCESS",
"data":{
"mobile":" 0061422118000",
"imsId":"20180392833833892100",
"customImsId":"2018010709302911"
}
}