{{ Pandora SEND SMS API }}

Welcome to the Pandora Send SMS API for both GET & POST methods. Our API that is flexible, scalable, and easy to integrate. Get familiar with our product by getting started or exploring our API documentation.

Get Started

The current & latest version of the API lives at https://www.sms.thepandoranetworks.com/API/send_sms/

Inorder to use the API to send SMS, you must have created a Pandora SMS Account .

URL

https://www.sms.thepandoranetworks.com/API/send_sms/?

Request Type

GET

Parameters

These are separated using the “&” sign just like in a normal http get.

Required
Number: This represents the URL encoded phone number.
Message: This represents the URL encoded SMS you are sending out. The message source Must have a maximum of 160 characters.
Sender: This represents who the message is coming from. Sender can have a maximum of 11 Characters and needs to be URL encoded too.
Username: The API callers username used to login to Pandora SMS.
Password: The API callers password used to login to Pandora SMS
Message Type: This represents the sms type i.e non_customised, customised or info.
Message category: This represents the sms category i.e bulk or group.

Success Response

If your request is success, a JSON object is retirned as follows

{"success": true, "message": "Your success message"}

Error Response

If your request is not success, a JSON object is retirned as follows

{"success": false, "error_message": "Your success message"}

Note: Send to Airtel and MTN contacts only

Examples
function SendSMS($message_type,$message_category,$number,$message) {
$username = 'your_username';
$password = 'your_password';
$sender = 'your_sender_id'; (not more than 20 characters i.e letters and digits)
$url = "sms.thepandoranetworks.com/API/send_sms/?";
$parameters="number=[number]&message=[message]&username=[username]&password=[password]&sender=[sender]&message_type=[message_type]&message_category=[message_category]";
$parameters = str_replace("[message]", urlencode($message), $parameters);
$parameters = str_replace("[sender]", urlencode($sender),$parameters);
$parameters = str_replace("[number]", urlencode($number),$parameters);
$parameters = str_replace("[username]", urlencode($username),$parameters);
$parameters = str_replace("[password]", urlencode($password),$parameters);
$parameters = str_replace("[message_type]", urlencode($message_type),$parameters);
$parameters = str_replace("[message_category]", urlencode($message_category),$parameters);
$live_url="https://".$url.$parameters;
$parse_url=file($live_url);
$response = $parse_url[0];
return json_decode($response, true);
}
// function calling
SendSMS('non_customised','bulk', '256703xxx', 'Pandora SMS Hello World');

The above PHP code will send the message “Pandora SMS Hello World” to 256703xxx

function post_request(array $params) { $url = "sms.thepandoranetworks.com/API/send_sms/"; $query_content = http_build_query($params); $fp = fopen($url, 'r', FALSE, // do not use_include_path stream_context_create([ 'http' => [ 'header' => [ // header array does not need '\r\n' 'Content-type: application/x-www-form-urlencoded', 'Content-Length: ' . strlen($query_content) ], 'method' => 'POST', 'content' => $query_content ] ])); if ($fp === FALSE) { return json_encode(['error' => 'Failed to get contents...']); } $result = stream_get_contents($fp); // no maxlength/offset fclose($fp); return json_decode($result, true); }
$username = 'your_account_username'; $password = 'your_account_password'; $message = 'test message'; $sender_id = 'post test'; $number = '0700366742'; $message_type = 'non_customised'; $message_category = 'bulk'; Example request
$send_sms = post_request(array('username'=>$username, 'password'=>$password, 'message'=>$message, 'sender_id'=>$sender_id, 'number'=>$number, 'message_type'=>$message_type, 'message_category'=>$message_category)); print_r($send_sms);

Coming Soon...

Coming Soon...

Coming Soon...

Coming Soon...

Coming Soon...

Coming Soon...

Coming Soon...