Send Single Bulk SMS via single XML API

http://msg.msgclub.net/rest/services/sendSMS/sendGroupSmsXmlApi

Include Body

yourAuthKeyhello how are youDEMOOS29999999999englishnid,a,groupA@nkush12/05/2015 12:00

Sample Output

e835e63a74604bd08f4934800c3e35fa 3001

Parameter Name with Description

Parameter Name Data Type Description
AUTH_KEY* Alphanumeric Login Authentication Key(This key is unique for every user)
smsContent * Text Enter your message
senderId* Text Enter senderId it should be less then 6 character
routeId * Integer Which route you want use for sending sms enter routeId for particular route.use given Id for route. 1 = Transactional Route, 2 = Promotional Route, 3 = Trans DND Route, 7 = Transcrub Route, 8 = OTP Route, 9 = Trans Stock Route, 10 = Trans Property Route, 11 = Trans DND Other Route, 12 = TransCrub Stock, 13 = TransCrub Property, 14 = Trans Crub Route.
mobileNumbers* Integer Mobile number can be entered with country code or without country code Multiple mobile no. should be separated by comma
smsContentType * Text "English" for text sms and "Unicode" for Unicode sms
groupName * text Enter groupName of group that you want to delete
signature Text Signature will be append at the end of sms
scheduleddate Text Sms will send on this time (Note:- Sheduled date should be less than 7 days And Greater than 5 Min from current time)

Note

Output will be request Id which is alphanumeric and contains 24 character like mentioned above. With this request Id, delivery Report can be Viewed. If Request not Sent Sucessfully, you will get the appropriate Error Message.
CURL *hnd = curl_easy_init(); curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST"); curl_easy_setopt(hnd, CURLOPT_URL, "http://msg.msgclub.net/rest/services/sendSMS/sendGroupSmsXmlApi"); struct curl_slist *headers = NULL; headers = curl_slist_append(headers, "Cache-Control: no-cache"); headers = curl_slist_append(headers, "Content-Type: application/xml"); curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers); curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "<Sms><AUTH_KEY>yourAuthKey</AUTH_KEY><smsContent>hello how are you</smsContent> <senderId>DEMOOS</senderId><routeId>2</routeId><mobileNumbers>9999999999</mobileNumbers><smsContentType>english </smsContentType><groupName>nid,a,groupA</groupName><signature>@nkush</signature><scheduleddate>12/05/2015 12:00 </scheduleddate></Sms>"); CURLcode ret = curl_easy_perform(hnd);
curl -X POST \ 'http://msg.msgclub.net/rest/services/sendSMS/sendGroupSmsXmlApi' \ -H 'Cache-Control: no-cache' \ -H 'Content-Type: application/xml' \ -d '<Sms><AUTH_KEY>yourAuthKey</AUTH_KEY><smsContent>hello how are you</smsContent><senderId>DEMOOS</senderId> <routeId>2</routeId><mobileNumbers>9999999999</mobileNumbers><smsContentType>english</smsContentType><groupName>nid,a, groupA</groupName><signature>@nkush</signature><scheduleddate>12/05/2015 12:00</scheduleddate></Sms>'
var client = new RestClient("http://msg.msgclub.net/rest/services/sendSMS/sendGroupSmsXmlApi"); var request = new RestRequest(Method.POST); request.AddHeader("Cache-Control", "no-cache"); request.AddHeader("Content-Type", "application/xml"); request.AddParameter("undefined", "<Sms><AUTH_KEY>yourAuthKey</AUTH_KEY><smsContent>hello how are you</smsContent> <senderId>DEMOOS</senderId><routeId>2</routeId><mobileNumbers>9999999999</mobileNumbers><smsContentType>english </smsContentType><groupName>nid,a,groupA</groupName><signature>@nkush</signature><scheduleddate>12/05/2015 12:00 </scheduleddate></Sms>", ParameterType.RequestBody); IRestResponse response = client.Execute(request);
package main import ( "fmt" "strings" "net/http" "io/ioutil" ) func main() { url := "http://msg.msgclub.net/rest/services/sendSMS/sendGroupSmsXmlApi" payload := strings.NewReader("<Sms><AUTH_KEY>yourAuthKey</AUTH_KEY><smsContent>hello how are you</smsContent> <senderId>DEMOOS</senderId><routeId>2</routeId><mobileNumbers>9999999999</mobileNumbers><smsContentType>english </smsContentType><groupName>nid,a,groupA</groupName><signature>@nkush</signature><scheduleddate>12/05/2015 12:00 </scheduleddate></Sms>") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Content-Type", "application/xml") req.Header.Add("Cache-Control", "no-cache") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("application/xml"); RequestBody body = RequestBody.create(mediaType, "<Sms><AUTH_KEY>yourAuthKey</AUTH_KEY><smsContent>hello how are you </smsContent><senderId>DEMOOS</senderId><routeId>2</routeId><mobileNumbers>9999999999</mobileNumbers><smsContentType> english</smsContentType><groupName>nid,a,groupA</groupName><signature>@nkush</signature><scheduleddate>12/05/2015 12:00 </scheduleddate></Sms>"); Request request = new Request.Builder() .url("http://msg.msgclub.net/rest/services/sendSMS/sendGroupSmsXmlApi") .post(body) .addHeader("Content-Type", "application/xml") .addHeader("Cache-Control", "no-cache") .build(); Response response = client.newCall(request).execute();
HttpResponse<String> response = Unirest.post("http://msg.msgclub.net/rest/services/sendSMS/sendGroupSmsXmlApi") .header("Content-Type", "application/xml") .header("Cache-Control", "no-cache") .body("<Sms><AUTH_KEY>yourAuthKey</AUTH_KEY><smsContent>hello how are you</smsContent><senderId>DEMOOS</senderId> <routeId>2</routeId><mobileNumbers>9999999999</mobileNumbers><smsContentType>english</smsContentType><groupName>nid,a, groupA</groupName><signature>@nkush</signature><scheduleddate>12/05/2015 12:00</scheduleddate></Sms>") .asString();
var settings = { "async": true, "crossDomain": true, "url": "http://msg.msgclub.net/rest/services/sendSMS/sendGroupSmsXmlApi", "method": "POST", "headers": { "Content-Type": "application/xml", "Cache-Control": "no-cache" }, "data": "<Sms><AUTH_KEY>yourAuthKey</AUTH_KEY><smsContent>hello how are you</smsContent><senderId>DEMOOS</senderId> <routeId>2</routeId><mobileNumbers>9999999999</mobileNumbers><smsContentType>english</smsContentType><groupName>nid,a, groupA</groupName><signature>@nkush</signature><scheduleddate>12/05/2015 12:00</scheduleddate></Sms>" } $.ajax(settings).done(function (response) { console.log(response); });
var data = "<Sms><AUTH_KEY>yourAuthKey</AUTH_KEY><smsContent>hello how are you</smsContent><senderId>DEMOOS</senderId> <routeId>2</routeId><mobileNumbers>9999999999</mobileNumbers><smsContentType>english</smsContentType><groupName>nid,a, groupA</groupName><signature>@nkush</signature><scheduleddate>12/05/2015 12:00</scheduleddate></Sms>"; var xhr = new XMLHttpRequest(); xhr.withCredentials = true; xhr.addEventListener("readystatechange", function () { if (this.readyState === 4) { console.log(this.responseText); } }); xhr.open("POST", "http://msg.msgclub.net/rest/services/sendSMS/sendGroupSmsXmlApi"); xhr.setRequestHeader("Content-Type", "application/xml"); xhr.setRequestHeader("Cache-Control", "no-cache"); xhr.send(data);
var http = require("http"); var options = { "method": "POST", "hostname": "msg.msgclub.net", "path": [ "rest", "services", "sendSMS", "sendGroupSmsXmlApi" ], "headers": { "Content-Type": "application/xml", "Cache-Control": "no-cache" } }; var req = http.request(options, function (res) { var chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { var body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.write("<Sms><AUTH_KEY>yourAuthKey</AUTH_KEY><smsContent>hello how are you</smsContent><senderId>DEMOOS</senderId> <routeId>2</routeId><mobileNumbers>9999999999</mobileNumbers><smsContentType>english</smsContentType><groupName>nid,a, groupA</groupName><signature>@nkush</signature><scheduleddate>12/05/2015 12:00</scheduleddate></Sms>"); req.end();
var request = require("request"); var options = { method: 'POST', url: 'http://msg.msgclub.net/rest/services/sendSMS/sendGroupSmsXmlApi', headers: { 'Cache-Control': 'no-cache', 'Content-Type': 'application/xml' }, body: '<Sms><AUTH_KEY>yourAuthKey</AUTH_KEY><smsContent>hello how are you</smsContent><senderId>DEMOOS</senderId> <routeId>2</routeId><mobileNumbers>9999999999</mobileNumbers><smsContentType>english</smsContentType><groupName>nid,a, groupA</groupName><signature>@nkush</signature><scheduleddate>12/05/2015 12:00</scheduleddate></Sms>' }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); });
var unirest = require("unirest"); var req = unirest("POST", "http://msg.msgclub.net/rest/services/sendSMS/sendGroupSmsXmlApi"); req.headers({ "Cache-Control": "no-cache", "Content-Type": "application/xml" }); req.send("<Sms><AUTH_KEY>yourAuthKey</AUTH_KEY><smsContent>hello how are you</smsContent><senderId>DEMOOS</senderId> <routeId>2</routeId><mobileNumbers>9999999999</mobileNumbers><smsContentType>english</smsContentType><groupName>nid,a, groupA</groupName><signature>@nkush</signature><scheduleddate>12/05/2015 12:00</scheduleddate></Sms>"); req.end(function (res) { if (res.error) throw new Error(res.error); console.log(res.body); });
open Cohttp_lwt_unix open Cohttp open Lwt let uri = Uri.of_string "http://msg.msgclub.net/rest/services/sendSMS/sendGroupSmsXmlApi" in let headers = Header.init () |> fun h -> Header.add h "Content-Type" "application/xml" |> fun h -> Header.add h "Cache-Control" "no-cache" in let body = Cohttp_lwt_body.of_string "<Sms><AUTH_KEY>yourAuthKey</AUTH_KEY><smsContent>hello how are you</smsContent> <senderId>DEMOOS</senderId><routeId>2</routeId><mobileNumbers>9999999999</mobileNumbers><smsContentType>english </smsContentType><groupName>nid,a,groupA</groupName><signature>@nkush</signature><scheduleddate>12/05/2015 12:00 </scheduleddate></Sms>" in Client.call ~headers ~body `POST uri >>= fun (res, body_stream) -> (* Do stuff with the result *)
<?php $request = new HttpRequest(); $request->setUrl('http://msg.msgclub.net/rest/services/sendSMS/sendGroupSmsXmlApi'); $request->setMethod(HTTP_METH_POST); $request->setHeaders(array( 'Cache-Control' => 'no-cache', 'Content-Type' => 'application/xml' )); $request->setBody('<Sms><AUTH_KEY>yourAuthKey</AUTH_KEY><smsContent>hello how are you</smsContent><senderId>DEMOOS </senderId><routeId>2</routeId><mobileNumbers>9999999999</mobileNumbers><smsContentType>english</smsContentType> <groupName>nid,a,groupA</groupName><signature>@nkush</signature><scheduleddate>12/05/2015 12:00</scheduleddate></Sms>'); try { $response = $request->send(); echo $response->getBody(); } catch (HttpException $ex) { echo $ex; }
<?php $client = new http\Client; $request = new http\Client\Request; $body = new http\Message\Body; $body->append('<Sms><AUTH_KEY>yourAuthKey</AUTH_KEY><smsContent>hello how are you</smsContent><senderId>DEMOOS</senderId> <routeId>2</routeId><mobileNumbers>9999999999</mobileNumbers><smsContentType>english</smsContentType><groupName>nid,a, groupA</groupName><signature>@nkush</signature><scheduleddate>12/05/2015 12:00</scheduleddate></Sms>'); $request->setRequestUrl('http://msg.msgclub.net/rest/services/sendSMS/sendGroupSmsXmlApi'); $request->setRequestMethod('POST'); $request->setBody($body); $request->setHeaders(array( 'Cache-Control' => 'no-cache', 'Content-Type' => 'application/xml' )); $client->enqueue($request)->send(); $response = $client->getResponse(); echo $response->getBody();
<?php $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => "http://msg.msgclub.net/rest/services/sendSMS/sendGroupSmsXmlApi", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => "<Sms><AUTH_KEY>yourAuthKey</AUTH_KEY><smsContent>hello how are you</smsContent><senderId>DEMOOS </senderId><routeId>2</routeId><mobileNumbers>9999999999</mobileNumbers><smsContentType>english</smsContentType> <groupName>nid,a,groupA</groupName><signature>@nkush</signature><scheduleddate>12/05/2015 12:00</scheduleddate></Sms>", CURLOPT_HTTPHEADER => array( "Cache-Control: no-cache", "Content-Type: application/xml" ), )); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; }
import http.client conn = http.client.HTTPConnection("msg.msgclub.net") payload = "<Sms><AUTH_KEY>yourAuthKey</AUTH_KEY><smsContent>hello how are you</smsContent><senderId>DEMOOS</senderId> <routeId>2</routeId><mobileNumbers>9999999999</mobileNumbers><smsContentType>english</smsContentType><groupName>nid,a, groupA</groupName><signature>@nkush</signature><scheduleddate>12/05/2015 12:00</scheduleddate></Sms>" headers = { 'Content-Type': "application/xml", 'Cache-Control': "no-cache" } conn.request("POST", "rest,services,sendSMS,sendGroupSmsXmlApi", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
import requests url = "http://msg.msgclub.net/rest/services/sendSMS/sendGroupSmsXmlApi" payload = "<Sms><AUTH_KEY>yourAuthKey</AUTH_KEY><smsContent>hello how are you</smsContent><senderId>DEMOOS</senderId> <routeId>2</routeId><mobileNumbers>9999999999</mobileNumbers><smsContentType>english</smsContentType><groupName>nid,a, groupA</groupName><signature>@nkush</signature><scheduleddate>12/05/2015 12:00</scheduleddate></Sms>" headers = { 'Content-Type': "application/xml", 'Cache-Control': "no-cache" } response = requests.request("POST", url, data=payload, headers=headers) print(response.text)
require 'uri' require 'net/http' url = URI("http://msg.msgclub.net/rest/services/sendSMS/sendGroupSmsXmlApi") http = Net::HTTP.new(url.host, url.port) request = Net::HTTP::Post.new(url) request["Content-Type"] = 'application/xml' request["Cache-Control"] = 'no-cache' request.body = "<Sms><AUTH_KEY>yourAuthKey</AUTH_KEY><smsContent>hello how are you</smsContent><senderId>DEMOOS </senderId><routeId>2</routeId><mobileNumbers>9999999999</mobileNumbers><smsContentType>english</smsContentType> <groupName>nid,a,groupA</groupName><signature>@nkush</signature><scheduleddate>12/05/2015 12:00</scheduleddate></Sms>" response = http.request(request) puts response.read_body
wget --quiet \ --method POST \ --header 'Content-Type: application/xml' \ --header 'Cache-Control: no-cache' \ --body-data '<Sms><AUTH_KEY>yourAuthKey</AUTH_KEY><smsContent>hello how are you</smsContent><senderId>DEMOOS</senderId> <routeId>2</routeId><mobileNumbers>9999999999</mobileNumbers><smsContentType>english</smsContentType><groupName>nid,a, groupA</groupName><signature>@nkush</signature><scheduleddate>12/05/2015 12:00</scheduleddate></Sms>' \ --output-document \ - http://msg.msgclub.net/rest/services/sendSMS/sendGroupSmsXmlApi
echo '<Sms><AUTH_KEY>yourAuthKey</AUTH_KEY><smsContent>hello how are you</smsContent><senderId>DEMOOS</senderId> <routeId>2</routeId><mobileNumbers>9999999999</mobileNumbers><smsContentType>english</smsContentType><groupName>nid,a, groupA</groupName><signature>@nkush</signature><scheduleddate>12/05/2015 12:00</scheduleddate></Sms>' | \ http POST http://msg.msgclub.net/rest/services/sendSMS/sendGroupSmsXmlApi \ Cache-Control:no-cache \ Content-Type:application/xml
curl --request POST \ --url http://msg.msgclub.net/rest/services/sendSMS/sendGroupSmsXmlApi \ --header 'Cache-Control: no-cache' \ --header 'Content-Type: application/xml' \ --data '<Sms><AUTH_KEY>yourAuthKey</AUTH_KEY><smsContent>hello how are you</smsContent><senderId>DEMOOS</senderId> <routeId>2</routeId><mobileNumbers>9999999999</mobileNumbers><smsContentType>english</smsContentType><groupName>nid,a, groupA</groupName><signature>@nkush</signature><scheduleddate>12/05/2015 12:00</scheduleddate></Sms>'
#import <Foundation/Foundation.h> NSDictionary *headers = @{ @"Content-Type": @"application/xml", @"Cache-Control": @"no-cache" }; NSData *postData = [[NSData alloc] initWithData:[@"<Sms><AUTH_KEY>yourAuthKey</AUTH_KEY><smsContent>hello how are you </smsContent><senderId>DEMOOS</senderId><routeId>2</routeId><mobileNumbers>9999999999</mobileNumbers><smsContentType> english</smsContentType><groupName>nid,a,groupA</groupName><signature>@nkush</signature><scheduleddate>12/05/2015 12:00 </scheduleddate></Sms>" dataUsingEncoding:NSUTF8StringEncoding]]; NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"http://msg.msgclub.net/rest/ services/sendSMS/sendGroupSmsXmlApi"] cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:10.0]; [request setHTTPMethod:@"POST"]; [request setAllHTTPHeaderFields:headers]; [request setHTTPBody:postData]; NSURLSession *session = [NSURLSession sharedSession]; NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { if (error) { NSLog(@"%@", error); } else { NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response; NSLog(@"%@", httpResponse); } }]; [dataTask resume];
import Foundation let headers = [ "Content-Type": "application/xml", "Cache-Control": "no-cache" ] let postData = NSData(data: "<Sms><AUTH_KEY>yourAuthKey</AUTH_KEY><smsContent>hello how are you</smsContent><senderId>DEMOOS</senderId><routeId>2</routeId><mobileNumbers>9999999999</mobileNumbers><smsContentType>english</smsContentType><groupName>nid,a,groupA</groupName><signature>@nkush</signature><scheduleddate>12/05/2015 12:00</scheduleddate></Sms>".data(using: String.Encoding.utf8)!) let request = NSMutableURLRequest(url: NSURL(string: "http://msg.msgclub.net/rest/services/sendSMS/sendGroupSmsXmlApi")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume()