Send SMS Gateway API – JAVA
This command can be used to send text messages to either individual numbers or entire contact groups.
Sample Request
- public static void main(String[] args) {
- String url = "http://serverURL/rest/services/sendSMS/sendGroupSms";
- String authKey="yourAuthKey";
- String message=null;
- message=URLEncoder.encode("Hello for test");
- String senderId="MSGTST";
- String routeId="1";
- String mobileNos="9999999999,8888888888";
- String smsContentType="english";
- String scheduledTime="";
- String groupName="";
- String signature="";
- System.out.println(message);
- SendSmsDemo send=new SendSmsDemo();
- String s=send.sendSmsGet(url, authKey, message, senderId, routeId, mobileNos, smsContentType,scheduledTime,signature,groupName);
- System.out.println(s);
- }
- }
- //{" response":"success","responseCode":"3001"}
- public static void main(String[] args) {
- String url = "http://serverURL/rest/services/sendSMS/sendGroupSms";
- String authKey="yourAuthKey";
- String message=null;
- message="Hello for test";
- String senderId="MSGTST";
- String routeId="1";
- String mobileNos="9999999999,8888888888";
- String smsContentType="english";
- String scheduledTime="";
- String groupName="";
- String signature="";
- System.out.println(message);
- SendSmsDemo send=new SendSmsDemo();
- String s=send.sendSmsPost(url, authKey, message, senderId, routeId, mobileNos, smsContentType,scheduledTime,signature,groupName);
- System.out.println(s);
- }
- }
- //{" response":"success","responseCode":"3001"}
- public static void main(String[] args) {
- String url="http://serverURL/rest/services/sendSMS/sendGroupSmsXmlApi";*/
- String authKey="yourAuthKey";
- String message=null;
- message="Hello for test";
- String senderId="MSGTST";
- String routeId="1";
- String mobileNos="9999999999,8888888888";
- String smsContentType="english";
- String scheduledTime="";
- String groupName="";
- String signature="";
- System.out.println(message);
- SendSmsDemo send=new SendSmsDemo();
- String s=send.sendSmsXml(url, authKey, message, senderId, routeId, mobileNos, smsContentType,scheduledTime,signature,groupName);
- System.out.println(s);
- }
- }
- //{" response":"success","responseCode":"3001"}
Caution: Some users opt to place their request inside a code loop, while testing we highly recommend setting the test parameter to true , as occasionally an infinite loop can occur and users can consume all their credits very quickly.