Developer's API

Reports Query
Base URL

Submit all reports query requests to the base URL. All the requests are submitted through HTTP POST method.

Base URL: http://www.connectmedia.co.ke/user-board/?api
Parameters
Parameter Name Type Description
username String Your ConnectMedia.Co.Ke Account Username
password String Your ConnectMedia.Co.Ke Account Password
action String Its value should be fixed
'balance' when querying remaining account balance through API
'history' when fetching sent sms history along with its Delivery Status
Examples

PHP

                        
                            
For Fetching Account Balance
$username = "your username";
$password = "your password";
$postUrl = "http://www.connectmedia.co.ke/user-board/?api";
$action="balance";
$post = [
'action' => "$action", //Please don’t change
'username' => "$username", //Please don’t change
'password' => "$password", //Please don’t change
];
$ch = curl_init($postUrl); //Please don’t change
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post));
$response = curl_exec($ch);
curl_close($ch);


For Fetching Delivery Reports
$username = "your username";
$password = "your password";
$postUrl = "http://www.connectmedia.co.ke/user-board/?api";
$action="history";
$post = [
'action' => "$action", //Please don’t change
'username' => "$username", //Please don’t change
'password' => "$password", //Please don’t change
];
$ch = curl_init($postUrl); //Please don’t change
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post));
$response = curl_exec($ch);
curl_close($ch);
More Samples Available Here