PHP短信接口         ASP短信接口         ASP.NET短信接口         JAVA短信接口
珑云JAVA短信接口API示例

final String userName = "注册用户名";
final String key = "接口鉴权KEY";
final String mobileNos = "要发送的手机号码,多个用逗号隔开";
final String content = "验证码:8888";
//https协议请改用https://api.smslong.cn/ 短信接口
final String url = "http://api.smslong.cn:8082/";

Map<String, String> personMap = new HashMap<String, String>();
personMap.put("user", userName);
personMap.put("key", key);
personMap.put("mobile", mobileNos);
personMap.put("content", content);
List<NameValuePair> list = new LinkedList<NameValuePair>();
for (Entry<String, String> entry : personMap.entrySet()){
list.add(new BasicNameValuePair(entry.getKey(), entry.getValue()));
}
HttpPost httpPost = new HttpPost(url);
UrlEncodedFormEntity formEntity = new UrlEncodedFormEntity(list, "gbk");
httpPost.setEntity(formEntity);
HttpClient httpCient = HttpClients.createDefault();
HttpResponse httpresponse = null;
try{
httpresponse = httpCient.execute(httpPost);
HttpEntity httpEntity = httpresponse.getEntity();
String response = EntityUtils.toString(httpEntity, "gbk");
System.out.println("http状态码:"+response);
}
catch (ClientProtocolException e){
System.out.println("http请求失败,uri{},exception{}");
}
catch (IOException e){
System.out.println("http请求失败,uri{},exception{}");
}

珑云JAVA短信接口SDK演示文件下载
SDK下载地址:https://www.smslong.cn/down/JAVA-SMS-SDK.rar
珑云短信接口下发地址
http协议短信接口:http://api.smslong.cn:8082/?user=用户名&key=接口鉴权KEY&mobile=手机号码&content=短信内容
https协议加密接口:https://api.smslong.cn/?user=用户名&key=接口鉴权KEY&mobile=手机号码&content=短信内容
推送方式:GET 或 POST
编码方式:UTF-8
user=本站注册用户名
key=接口鉴权码,非登录密码
mobile=多个手机号码用半角逗号,隔开,如:13800000000,13800000001,最多支持100个号码
content=短信内容,最多支持400个字,含签名
返回大于0的数字为成功,代表扣费条数,其他为提交失败,请自行处理
珑云短信接口回复设置
接收地址:http://您的公网IP或域名/文件路径地址
变量方式:mobile=手机号码&content=回复内容&key=接口鉴权KEY
推送方式:POST
编码方式:UTF-8
推送说明:用户回复时,推送至用户指定地址,返回1,视为推送成功,否则推送失败,连续推送3次失败,接口自动关闭
珑云短信接口查询余额
http协议短信接口:http://number.api.smslong.cn/?user=用户名&key=接口鉴权KEY
https协议加密接口:https://number.api.smslong.cn/?user=用户名&key=接口鉴权KEY
推送方式:GET 或 POST
编码方式:UTF-8
接口返回大于或等于0的数字,代表账户剩余短信条数,其他为错误
短信接口返回值
>0:提交成功,扣费数量
-11:用户名不匹配
-12:接口鉴权KEY不匹配,非登录密码
-13:账户余额不足
-14:账户被屏蔽
-21:手机号码错误
-22:手机号码超过限制
-23:短信内容为空
-24:短信内容出现非法字符
-25:短信签名为空
-26:短信签名超长
-30:接口IP被限制访问
其他错误
接口集成注意事项
1、接口对接测试短信时,请发送正规内容短信,如验证码、订单通知,千万不要发送无意义的内容:如 测试、您好。
2、为防止骚扰,默认相同号码一天只能发送20条短信,验证码信息30分钟内只能提交10条。
3、验证码注册集成,建议设置图形校验码来识别是否为人工注册。
4、短信发送需报备短信模板,模板可以带多个变量。如无模板报备的短信需要人工审核,审核时间9:00~21:00。
Copyright © 2017-2021 smslong.cn Inc. All Rights Reserved 上海珑云网络科技有限公司 版权所有
沪ICP备19035680号-7     客服服务中心:400-990-2818