Global Voice Call OBD Bulk SMS API For add Group in phonebook

http://msg.msgclub.net/rest/services/phonebook/addGroup?AUTH_KEY=YourAuthKey&groupName=groupName

Sample Output

{"response":"Success","responseCode":"3001"}

Parameter Name with Description

Parameter Name Data Type Description
AUTH_KEY* Alphanumeric Login Authentication Key(This key is unique for every user)
groupName * Text Enter groupName of group that you want to delete
CURL *hnd = curl_easy_init(); curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET"); curl_easy_setopt(hnd, CURLOPT_URL, "http://msg.msgclub.net/rest/services/phonebook/addGroup?AUTH_KEY=YourAuthKey &groupName=groupName"); struct curl_slist *headers = NULL; headers = curl_slist_append(headers, "Cache-Control: no-cache"); curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers); curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, " {\"routeId\":\"1\",\"sentSmsNumList\":[{ \"mobileNumber\":\"8888888888\", \"isAdvanceSms\":\"Hello How Are You\"},{ \"mobileNumber\":\"9999999999\", \"isAdvanceSms\":\"Good Morning\"}] , \"senderId\":\"DEMOOS\",\"signature\":\"signature\",\"smsContentType\":\"english\"}"); CURLcode ret = curl_easy_perform(hnd);
curl -X GET \ 'http://msg.msgclub.net/rest/services/phonebook/addGroup?AUTH_KEY=YourAuthKey&groupName=groupName' \ -H 'Cache-Control: no-cache' \ -d ' {"routeId":"1","sentSmsNumList":[{ "mobileNumber":"8888888888", "isAdvanceSms":"Hello How Are You"},{ "mobileNumber":"9999999999", "isAdvanceSms":"Good Morning"}] ,"senderId":"DEMOOS","signature":"signature","smsContentType":"english"}'
var client = new RestClient("http://msg.msgclub.net/rest/services/phonebook/addGroup?AUTH_KEY=YourAuthKey&groupName=groupName"); var request = new RestRequest(Method.GET); request.AddHeader("Cache-Control", "no-cache"); request.AddParameter("undefined", " {\"routeId\":\"1\",\"sentSmsNumList\": [{ \"mobileNumber\":\"8888888888\", \"isAdvanceSms\":\"Hello How Are You\"}, { \"mobileNumber\":\"9999999999\", \"isAdvanceSms\":\"Good Morning\"}] , \"senderId\":\"DEMOOS\",\"signature\":\"signature\", \"smsContentType\":\"english\"}", 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/phonebook/addGroup?AUTH_KEY=YourAuthKey &groupName=groupName" payload := strings.NewReader(" {\"routeId\":\"1\",\"sentSmsNumList\":[{ \"mobileNumber\":\"8888888888\", \"isAdvanceSms\":\"Hello How Are You\"},{ \"mobileNumber\":\"9999999999\", \"isAdvanceSms\":\"Good Morning\"}] , \"senderId\":\"DEMOOS\",\"signature\":\"signature\",\"smsContentType\":\"english\"}") req, _ := http.NewRequest("GET", url, payload) 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/octet-stream"); RequestBody body = RequestBody.create(mediaType, " {\"routeId\":\"1\",\"sentSmsNumList\":[{ \"mobileNumber\": \"8888888888\", \"isAdvanceSms\":\"Hello How Are You\"},{ \"mobileNumber\":\"9999999999\", \"isAdvanceSms\": \"Good Morning\"}] ,\"senderId\":\"DEMOOS\",\"signature\":\"signature\",\"smsContentType\":\"english\"}"); Request request = new Request.Builder() .url("http://msg.msgclub.net/rest/services/phonebook/addGroup?AUTH_KEY=YourAuthKey&groupName=groupName") .get() .addHeader("Cache-Control", "no-cache") .build(); Response response = client.newCall(request).execute();
HttpResponse<String> response = Unirest.get("http://msg.msgclub.net/rest/services/phonebook/addGroup?AUTH_KEY=YourAuthKey& groupName=groupName") .header("Cache-Control", "no-cache") .body(" {\"routeId\":\"1\",\"sentSmsNumList\":[{ \"mobileNumber\":\"8888888888\", \"isAdvanceSms\": \"Hello How Are You\"},{ \"mobileNumber\":\"9999999999\", \"isAdvanceSms\":\"Good Morning\"}] ,\"senderId\": \"DEMOOS\",\"signature\":\"signature\",\"smsContentType\":\"english\"}") .asString();
var settings = { "async": true, "crossDomain": true, "url": "http://msg.msgclub.net/rest/services/phonebook/addGroup?AUTH_KEY=YourAuthKey&groupName=groupName", "method": "GET", "headers": { "Cache-Control": "no-cache" }, "data": " {\"routeId\":\"1\",\"sentSmsNumList\":[{ \"mobileNumber\":\"8888888888\", \"isAdvanceSms\": \"Hello How Are You\"},{ \"mobileNumber\":\"9999999999\", \"isAdvanceSms\":\"Good Morning\"}] ,\"senderId\": \"DEMOOS\",\"signature\":\"signature\",\"smsContentType\":\"english\"}" } $.ajax(settings).done(function (response) { console.log(response); });
var data = " {\"routeId\":\"1\",\"sentSmsNumList\":[{ \"mobileNumber\":\"8888888888\", \"isAdvanceSms\": \"Hello How Are You\"},{ \"mobileNumber\":\"9999999999\", \"isAdvanceSms\":\"Good Morning\"}] ,\"senderId\": \"DEMOOS\",\"signature\":\"signature\",\"smsContentType\":\"english\"}"; var xhr = new XMLHttpRequest(); xhr.withCredentials = true; xhr.addEventListener("readystatechange", function () { if (this.readyState === 4) { console.log(this.responseText); } }); xhr.open("GET", "http://msg.msgclub.net/rest/services/phonebook/addGroup?AUTH_KEY=YourAuthKey&groupName=groupName"); xhr.setRequestHeader("Cache-Control", "no-cache"); xhr.send(data);
var http = require("http"); var options = { "method": "GET", "hostname": "msg.msgclub.net", "path": [ "rest", "services", "phonebook", "addGroup" ], "headers": { "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(" {\"routeId\":\"1\",\"sentSmsNumList\":[{ \"mobileNumber\":\"8888888888\", \"isAdvanceSms\": \"Hello How Are You\"},{ \"mobileNumber\":\"9999999999\", \"isAdvanceSms\":\"Good Morning\"}] ,\"senderId\": \"DEMOOS\",\"signature\":\"signature\",\"smsContentType\":\"english\"}"); req.end();
var request = require("request"); var options = { method: 'GET', url: 'http://msg.msgclub.net/rest/services/phonebook/addGroup', qs: { AUTH_KEY: 'YourAuthKey', groupName: 'groupName' }, headers: { 'Cache-Control': 'no-cache' }, body: ' {"routeId":"1","sentSmsNumList":[{ "mobileNumber":"8888888888", "isAdvanceSms":"Hello How Are You"}, { "mobileNumber":"9999999999", "isAdvanceSms":"Good Morning"}] ,"senderId":"DEMOOS","signature":"signature", "smsContentType":"english"}' }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); });
var unirest = require("unirest"); var req = unirest("GET", "http://msg.msgclub.net/rest/services/phonebook/addGroup"); req.query({ "AUTH_KEY": "YourAuthKey", "groupName": "groupName" }); req.headers({ "Cache-Control": "no-cache" }); req.send(" {\"routeId\":\"1\",\"sentSmsNumList\":[{ \"mobileNumber\":\"8888888888\", \"isAdvanceSms\": \"Hello How Are You\"},{ \"mobileNumber\":\"9999999999\", \"isAdvanceSms\":\"Good Morning\"}] ,\"senderId\": \"DEMOOS\",\"signature\":\"signature\",\"smsContentType\":\"english\"}"); 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/phonebook/addGroup?AUTH_KEY=YourAuthKey&groupName=groupName" in let headers = Header.init () |> fun h -> Header.add h "Cache-Control" "no-cache" in let body = Cohttp_lwt_body.of_string " {\"routeId\":\"1\",\"sentSmsNumList\":[{ \"mobileNumber\":\"8888888888\", \"isAdvanceSms\":\"Hello How Are You\"},{ \"mobileNumber\":\"9999999999\", \"isAdvanceSms\":\"Good Morning\"}] , \"senderId\":\"DEMOOS\",\"signature\":\"signature\",\"smsContentType\":\"english\"}" in Client.call ~headers ~body `GET uri >>= fun (res, body_stream) -> (* Do stuff with the result *)
<?php $request = new HttpRequest(); $request->setUrl('http://msg.msgclub.net/rest/services/phonebook/addGroup'); $request->setMethod(HTTP_METH_GET); $request->setQueryData(array( 'AUTH_KEY' => 'YourAuthKey', 'groupName' => 'groupName' )); $request->setHeaders(array( 'Cache-Control' => 'no-cache' )); $request->setBody(' {"routeId":"1","sentSmsNumList":[{ "mobileNumber":"8888888888", "isAdvanceSms":"Hello How Are You"}, { "mobileNumber":"9999999999", "isAdvanceSms":"Good Morning"}] ,"senderId":"DEMOOS","signature":"signature", "smsContentType":"english"}'); 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(' {"routeId":"1","sentSmsNumList":[{ "mobileNumber":"8888888888", "isAdvanceSms":"Hello How Are You"}, { "mobileNumber":"9999999999", "isAdvanceSms":"Good Morning"}] ,"senderId":"DEMOOS","signature":"signature", "smsContentType":"english"}'); $request->setRequestUrl('http://msg.msgclub.net/rest/services/phonebook/addGroup'); $request->setRequestMethod('GET'); $request->setBody($body); $request->setQuery(new http\QueryString(array( 'AUTH_KEY' => 'YourAuthKey', 'groupName' => 'groupName' ))); $request->setHeaders(array( 'Cache-Control' => 'no-cache' )); $client->enqueue($request)->send(); $response = $client->getResponse(); echo $response->getBody();
<?php $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_PORT => "1", CURLOPT_URL => "http://msg.msgclub.net/rest/services/phonebook/addGroup?AUTH_KEY=YourAuthKey&groupName=groupName", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_POSTFIELDS => " {\"routeId\":\"1\",\"sentSmsNumList\":[{ \"mobileNumber\":\"8888888888\", \"isAdvanceSms\": \"Hello How Are You\"},{ \"mobileNumber\":\"9999999999\", \"isAdvanceSms\":\"Good Morning\"}] ,\"senderId\": \"DEMOOS\",\"signature\":\"signature\",\"smsContentType\":\"english\"}", CURLOPT_HTTPHEADER => array( "Cache-Control: no-cache" ), )); $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 = " {\"routeId\":\"1\",\"sentSmsNumList\":[{ \"mobileNumber\":\"8888888888\", \"isAdvanceSms\": \"Hello How Are You\"},{ \"mobileNumber\":\"9999999999\", \"isAdvanceSms\":\"Good Morning\"}] ,\"senderId\": \"DEMOOS\",\"signature\":\"signature\",\"smsContentType\":\"english\"}" headers = { 'Cache-Control': "no-cache" } conn.request("GET", "rest,services,phonebook,addGroup", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
import requests url = "http://msg.msgclub.net/rest/services/phonebook/addGroup" querystring = {"AUTH_KEY":"YourAuthKey","groupName":"groupName"} payload = " {\"routeId\":\"1\",\"sentSmsNumList\":[{ \"mobileNumber\":\"8888888888\", \"isAdvanceSms\": \"Hello How Are You\"},{ \"mobileNumber\":\"9999999999\", \"isAdvanceSms\":\"Good Morning\"}] ,\"senderId\": \"DEMOOS\",\"signature\":\"signature\",\"smsContentType\":\"english\"}" headers = { 'Cache-Control': "no-cache" } response = requests.request("GET", url, data=payload, headers=headers, params=querystring) print(response.text)
require 'uri' require 'net/http' url = URI("http://msg.msgclub.net/rest/services/phonebook/addGroup?AUTH_KEY=YourAuthKey&groupName=groupName") http = Net::HTTP.new(url.host, url.port) request = Net::HTTP::Get.new(url) request["Cache-Control"] = 'no-cache' request.body = " {\"routeId\":\"1\",\"sentSmsNumList\":[{ \"mobileNumber\":\"8888888888\", \"isAdvanceSms\": \"Hello How Are You\"},{ \"mobileNumber\":\"9999999999\", \"isAdvanceSms\":\"Good Morning\"}] ,\"senderId\": \"DEMOOS\",\"signature\":\"signature\",\"smsContentType\":\"english\"}" response = http.request(request) puts response.read_body
wget --quiet \ --method GET \ --header 'Cache-Control: no-cache' \ --body-data ' {"routeId":"1","sentSmsNumList":[{ "mobileNumber":"8888888888", "isAdvanceSms":"Hello How Are You"}, { "mobileNumber":"9999999999", "isAdvanceSms":"Good Morning"}] ,"senderId":"DEMOOS","signature":"signature", "smsContentType":"english"}' \ --output-document \ - 'http://msg.msgclub.net/rest/services/phonebook/addGroup?AUTH_KEY=YourAuthKey&groupName=groupName'
echo ' {"routeId":"1","sentSmsNumList":[{ "mobileNumber":"8888888888", "isAdvanceSms":"Hello How Are You"}, { "mobileNumber":"9999999999", "isAdvanceSms":"Good Morning"}] ,"senderId":"DEMOOS","signature":"signature", "smsContentType":"english"}' | \ http GET 'http://msg.msgclub.net/rest/services/phonebook/addGroup?AUTH_KEY=YourAuthKey&groupName=groupName' \ Cache-Control:no-cache
curl --request GET \ --url 'http://msg.msgclub.net/rest/services/phonebook/addGroup?AUTH_KEY=YourAuthKey&groupName=groupName' \ --header 'Cache-Control: no-cache' \ --data ' {"routeId":"1","sentSmsNumList":[{ "mobileNumber":"8888888888", "isAdvanceSms":"Hello How Are You"}, { "mobileNumber":"9999999999", "isAdvanceSms":"Good Morning"}] ,"senderId":"DEMOOS","signature":"signature", "smsContentType":"english"}'
#import <Foundation/Foundation.h> NSDictionary *headers = @{ @"Cache-Control": @"no-cache"}; NSData *postData = [[NSData alloc] initWithData:[@" {"routeId":"1","sentSmsNumList":[{ "mobileNumber":"8888888888", "isAdvanceSms":"Hello How Are You"},{ "mobileNumber":"9999999999", "isAdvanceSms":"Good Morning"}] ,"senderId":"DEMOOS", "signature":"signature","smsContentType":"english"}" dataUsingEncoding:NSUTF8StringEncoding]]; NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"http://msg.msgclub.net/rest/ services/phonebook/addGroup?AUTH_KEY=YourAuthKey&groupName=groupName"] cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:10.0]; [request setHTTPMethod:@"GET"]; [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 = [ "Cache-Control": "no-cache" ] let postData = NSData(data: " {"routeId":"1","sentSmsNumList":[{ "mobileNumber":"8888888888", "isAdvanceSms": "Hello How Are You"},{ "mobileNumber":"9999999999", "isAdvanceSms":"Good Morning"}] ,"senderId":"DEMOOS", "signature":"signature","smsContentType":"english"}".data(using: String.Encoding.utf8)!) let request = NSMutableURLRequest(url: NSURL(string: "http://msg.msgclub.net/rest/services/phonebook/addGroup?AUTH_KEY=YourAuthKey&groupName=groupName")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" 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()