JAVA IMPORT
HttpClient httpclient = HttpClients.createDefault();
HttpPost httppost = new HttpPost("https://rest.sendmode.com/v2/END_POINT");
httppost.setHeader(HttpHeaders.AUTHORIZATION, YOUR_ACCESS_KEY);
HttpClient httpclient = HttpClients.createDefault();
HttpPost httppost = new HttpPost("https://rest.sendmode.com/v2/END_POINT");
httppost.setHeader(HttpHeaders.AUTHORIZATION, YOUR_ACCESS_KEY);
$url = 'https://rest.sendmode.com/v2/END_POINT';
$data = array(YOUR_DATA);
$options = array(
'http' => array(
'header' => "Content-type: application/x-www-form-urlencoded\r\n" .
"Authorization: YOUR_ACCESS_KEY\r\n",
'method' => 'POST',
'content' => http_build_query($data)
)
);
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
using (WebClient client = new WebClient())
{
client.Headers.Add("Authorization", "YOUR_ACCESS_KEY");
}
www.DOMAIN.com/HLR_PAGE.aspx?mobilenumber=353870000000&status=0&mncid=27201&customerid=12345
www.DOMAIN.com/REPLY_PAGE.aspx?mobilenumber=353870000000&command=Hello World Reply&sentto=353871234567
www.DOMAIN.com/DLR_PAGE.aspx?EventID=32433326&Phonenumber=353870000000&DataType=SMS &Status=DELIVRD&CustomerID=YOUR_PASSED_CUSTOMER_ID
{
"status":"OK",
"statusCode":0,
"mobilenumber":"0870000000",
"customerid":"-1",
"acceptedDateTime":"2017-08-29T12:26:56.1348586+01:00"
}
$url = 'https://rest.sendmode.com/v2/hlr';
$data = array('mobilenumber' => '0870000000');
$options = array(
'http' => array(
'header' => "Content-type: application/x-www-form-urlencoded\r\n" .
"Authorization: YOUR_ACCESS_KEY\r\n",
'method' => 'POST',
'content' => http_build_query($data)
)
);
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
using (WebClient client = new WebClient())
{
client.Headers.Add("Authorization", "YOUR_ACCESS_KEY");
byte[] response =
client.UploadValues("http://rest.sendmode.com/v2/hlr", new NameValueCollection()
{
{ "mobilenumber", "0870000000" }
});
string result = System.Text.Encoding.UTF8.GetString(response);
}
{
"status":"OK",
"statusCode":0,
"message":{
"recipient":"353852455041",
"code":"78b6",
"expireDatetime":"29/08/2017 13:42:52",
"status":"VERIFIED",
"verifiedDate":"29/08/2017 11:43:31"
}
}