Bulk SMS
Send bulk and automated SMS to your clients.
Send bulk and automated SMS to your clients.
Easy to comminicate your clients/customers using USSD.
Reach your customers on mobile phones using short code.
HttpClient client = null;
if (client == null)
{
client = new HttpClient
{
BaseAddress = new Uri("https://smsapi.hormuud.com/")
};
}
string username = "XXXXXX";
string password = "XXXXXX";
HttpResponseMessage response =
client.PostAsync("Token",
new StringContent(string.Format("grant_type=password&username={0}&password={1}",
HttpUtility.UrlEncode(username),
HttpUtility.UrlEncode(password)), Encoding.UTF8,
"application/x-www-form-urlencoded")).Result;
string resultJSON = response.Content.ReadAsStringAsync().Result;
string AccessToken = (JObject.Parse(resultJSON).SelectToken("access_token")).ToString();
client.DefaultRequestHeaders.Clear();
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", AccessToken);
HttpResponseMessage Res = client.PostAsJsonAsync("api/Outbound/SendSMS", new
{
mobile = "61xxxxxx",
message = "SMS Content",
senderid = "Sender Name",
});
$curl = curl_init();
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl,CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_URL, 'https://smsapi.hormuud.com/token');
curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query(array('Username' => 'Username', 'Password' => 'YOUR PASSWORD', 'grant_type' => 'password')));
$response = curl_exec($curl);
$character = json_decode($response);
$headers = array("Content-Type: application/json; charset=utf-8","Authorization: Bearer ".$character->access_token);
$data = array(
"mobile" => "61xxxxxxx",
"message" => "SMS Context ",
"senderid" => "Sender Name"
);
$url = 'https://smsapi.hormuud.com/api/SendSMS';
$postdata = json_encode($data);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postdata);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$result = curl_exec($ch);
curl_close($ch);
import requests
import datetime
import json
payload = "grant_type=password&username=XXXXXX&password=XXXXXX"
response = requests.request("POST", 'https://smsapi.hormuud.com/token', data=payload,
headers={'content-type': "application/x-www-form-urlencoded"})
resp_dict1 = json.loads(response.text)
print(resp_dict1)
payload = {
"senderid":"Sender Name",
"mobile":"61xxxxxxx",
"message":"SMS Context"
}
sendsmsResp = requests.request("POST", 'https://smsapi.hormuud.com/api/SendSMS',data= json.dumps(payload),
headers={'Content-Type':'application/json', 'Authorization': 'Bearer ' + resp_dict1['access_token']})
respObj = json.loads(sendsmsResp.text)
Communicate with flexible tools that go where your team goes.
Get Started Request Demo