Releases: jpush/jsms-api-java-client
Releases · jpush/jsms-api-java-client
v1.2.10 Release
v1.2.9 添加 sign 支持
为 发送文本验证码短信,发送单条模板短信以及短信定时发送 添加 sign 字段
ref:
修复 updateTemplate 接口
Change Log
- 修复 updateTemplate 接口,增加 temp id
Add Template API
Change Log
- Add Template API
usage:
refer to JSMSExample.java
新增接口
Change Log
- 新增批量发送模板短信接口,用法参考
JSMSExample
新增 API
改动日志
- 新增定时短信相关 API
- 新增短信余量查询相关 API
使用方式参考 JSMSExample
Change Log
- Add Schedule SMS APIs
- Add check SMS balance APIs
Please refer to JSMSExample for detail.
v1.2.1 Release
更新日志
- 使用 jiguang-common 1.0.6
v1.2.0 新功能
改动日志
- 使用 jiguang-common v1.0.5
- SMSClient 可以设置使用哪个 HttpClient 发送请求。
Example:
public static void testSendSMSWithIHttpClient() {
SMSClient client = new SMSClient(masterSecret, appkey);
String authCode = ServiceHelper.getBasicAuthorization(appkey, masterSecret);
ApacheHttpClient httpClient = new ApacheHttpClient(authCode, null, ClientConfig.getInstance());
// NettyHttpClient httpClient = new NettyHttpClient(authCode, null, ClientConfig.getInstance());
// 可以切换 HttpClient,默认使用的是 NativeHttpClient
client.setHttpClient(httpClient);
// 如果使用 NettyHttpClient,发送完请求后要调用 close 方法
// client.close();
SMSPayload payload = SMSPayload.newBuilder()
.setMobildNumber("13800138000")
.setTempId(1)
.build();
try {
SendSMSResult res = client.sendSMSCode(payload);
System.out.println(res.toString());
LOG.info(res.toString());
} catch (APIConnectionException e) {
LOG.error("Connection error. Should retry later. ", e);
} catch (APIRequestException e) {
LOG.error("Error response from JPush server. Should review and fix it. ", e);
LOG.info("HTTP Status: " + e.getStatus());
LOG.info("Error Message: " + e.getMessage());
}
}
v1.1.1 Release
-去掉号码验证,解决支持号段问题(交给服务端验证)
v1.1.0 Release
- 增加发送语音短信验证码以及模板短信 API