Developers API

GET

http://clientlogin.bulksmsgh.com/smsapi?key=xxxxx&to=xxxxx&msg=xxxxx&sender_id=xxxxx
Parameters Required Type Description
API key Yes String Login to your dashboard and create one
to Yes String Contacts message will be sent to
msg Yes String The message you want to send
sender_id Yes String An id to identify the sender of the message. eg: BulkSMS Ghana

Below are sample codes in PHP,Java and Python on how to use our API

$key="3cc0d30dfd925d7b554f" //your unique API key;
$message=urlencode($message) //encode url;
/*******************API URL FOR SENDING MESSAGES********/
$url="http://clientlogin.bulksmsgh.com/smsapi?key=$key&to=$phone&msg=$message&sender_id=$sender_id";
/****************API URL TO CHECK BALANCE****************/
$url="http://clientlogin.bulksmsgh.com/api/smsapibalance?key=$key";

$result=file_get_contents($url); //call url and store result;

switch($result){
case "1000":
echo "Message sent";
break;
case "1002":
echo "Message not sent";
break;
case "1003":
echo "You don't have enough balance";
break;
case "1004":
echo "Invalid API Key";
break;
case "1005":
echo "Phone number not valid";
break;
case "1006":
echo "Invalid Sender ID";
break;
case "1008":
echo "Empty message";
break;
}