SMS Broadcast

Developers

if ($user == "Developer"){ echo "Welcome!"; }

The SMS Broadcast API allows you to integrate SMS messaging into your systems. Our API is a simple, yet powerful way to connect to our SMS gateway. There is no extra cost to use this service.

SMS Broadcast have two separate SMS gateways for adding SMS capability to software: a full feature HTTP API and an easy to use email API.

HTTP API

The HTTP API lets you send and receive messages, check credit balances, and receive updates to the the status of sent messages. It is ideal for sending bulk SMS messages and single messages.

You need the facility to make a HTTP or HTTPS connection to our URL. Our documentation contains all the required information and examples.

It doesn't matter which programming language you use, as long as it can make a HTTP connection. We have example code for PHP and .NET, and the documentation provides language agnostic examples if you want to implement into another language like Ruby or Java.

HTTP API Documentation PHP SDK

Email API

Many software packages with SMS capabilities can use the email-to-sms gateway to send messages.

Before working with the email API you need to setup an account and register your sending email address in your account settings.

Then it is as simple as emailing <mobilenumber>@send.smsbroadcast.com.au. The first 160 characters of your message will then be sent in the SMS message

Our technical support staff can provide additional assistance implementing the email-to-sms service and configuring your software with the email API.

Code examples

Type Language Language
Send outgoing SMS [php] [C#]
Receive inbound SMS [php]
Receive message status [php]
Fetch credit balance [php]
<?php
    
function sendSMS($content) {
        
$ch curl_init('https://api.smsbroadcast.com.au/api-adv.php');
        
curl_setopt($chCURLOPT_POSTtrue);
        
curl_setopt($chCURLOPT_POSTFIELDS$content);
        
curl_setopt($chCURLOPT_RETURNTRANSFERtrue);
        
$output curl_exec ($ch);
        
curl_close ($ch);
        return 
$output;    
    }

    
$username 'USERNAME';
    
$password 'PASSWORD';
    
$destination '0400000000'//Multiple numbers can be entered, separated by a comma
    
$source    'MyCompany';
    
$text 'This is our test message.';
    
$ref 'abc123';
        
    
$content =  'username='.rawurlencode($username).
                
'&password='.rawurlencode($password).
                
'&to='.rawurlencode($destination).
                
'&from='.rawurlencode($source).
                
'&message='.rawurlencode($text).
                
'&ref='.rawurlencode($ref);
  
    
$smsbroadcast_response sendSMS($content);
    
$response_lines explode("\n"$smsbroadcast_response);
    
     foreach( 
$response_lines as $data_line){
        
$message_data "";
        
$message_data explode(':',$data_line);
        if(
$message_data[0] == "OK"){
            echo 
"The message to ".$message_data[1]." was successful, with reference ".$message_data[2]."\n";
        }elseif( 
$message_data[0] == "BAD" ){
            echo 
"The message to ".$message_data[1]." was NOT successful. Reason: ".$message_data[2]."\n";
        }elseif( 
$message_data[0] == "ERROR" ){
            echo 
"There was an error with this request. Reason: ".$message_data[1]."\n";
        }
    }
?>
<?php
    
function sendSMS($content) {
        
$ch curl_init('https://api.smsbroadcast.com.au/api-adv.php');
        
curl_setopt($chCURLOPT_POSTtrue);
        
curl_setopt($chCURLOPT_POSTFIELDS$content);
        
curl_setopt($chCURLOPT_RETURNTRANSFERtrue);
        
$output curl_exec ($ch);
        
curl_close ($ch);
        return 
$output;    
    }

    
$username 'USERNAME';
    
$password 'PASSWORD';
    
$action    'balance';
        
    
$content =  'username='.rawurlencode($username).
                
'&password='.rawurlencode($password).
                
'&action='.rawurlencode($action);
                  
    
$smsbroadcast_response sendSMS($content);
    
$smsbroadcast_response explode(':'$smsbroadcast_response);
    
    if(
$smsbroadcast_response[0] == "OK"){
        echo 
"SMS Broadcast balance is ".$smsbroadcast_response[1];
    }elseif( 
$smsbroadcast_response[0] == "ERROR" ){
        echo 
"There was an error with this request. Reason: ".$smsbroadcast_response[1]."\n";
    }
?>
<?php

$to 
$_GET["to"]; //The receiving mobile number
$from $_GET["from"]; //The sending mobile number
$message urldecode($_GET["message"]); //SMS content


// You may wish to log this information in a database

// Lets send an email with the message data
$email_message "Inbound SMS sent to $to.\nSent From: $from\nMessage: $message";
mail("email@example.com""Inbound SMS"$message"From: email@example.com");

?>
<?php

$mobile 
$_GET["to"]; //The receiving mobile number
$ref $_GET["ref"]; // Your reference number, if provided when sending
$smsref $_GET["smsref"]; // SMS Broadcast reference number
$status $_GET["status"]; // Message status

// You may wish to log this information in a database

// Lets send an email with the updated data
$message "Status update for SMS sent to $mobile.\nOur reference: $ref\nSMS Broadcast Reference: $smsref\nThe message status is now $status.";
mail("email@example.com""SMS Status Update"$message"From: email@example.com");

?>
using System.Net;
using System.IO;
WebClient client = new WebClient ();
client.Headers.Add ("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.0.3705;)");
client.QueryString.Add("username", "xxxx");
client.QueryString.Add("password", "xxxx");
client.QueryString.Add("to", "xxxx");
client.QueryString.Add("from", "xxxx");
client.QueryString.Add("message", "Hello World!");
client.QueryString.Add("ref", "123");
client.QueryString.Add("maxsplit", "1");
string baseurl ="http://api.smsbroadcast.com.au/api-adv.php";
Stream data = client.OpenRead(baseurl);
StreamReader reader = new StreamReader (data);
string s = reader.ReadToEnd ();
data.Close ();
reader.Close ();
return (s);

Pippa E

Reminding clients of their appointment time is a great value-add - thanks to SMS broadcast.

Brad W

Easy to set up and get started. Integrates easily with our system.

Cameron M

SMS broadcast is easy to deal with and has simple APIs for developing against. Works perfectly for notifications from my simple security system.

Mark E

Seamless interaction with email systems and API - robust platform. Highly recommended. It. Just. Works.

Josh D

Easy to use API, love the options we get with this. Works well with MS Access as a SMS button.

Con T

Excellent value for money. API is well documented and easy to use. I would highly recommend this service.

Grant G

great easy to use website, full api support and great deals for bulk purchase

Joshua D

Easy to setup and use, great API functions which is great for creating buttons in Access to send SMS.

Cynthia K

SMS Broadcast has transformed how I will manage communicating with our clients for reminders of and making future appointments for immunisations. SMS communications has improved our statistics for immunization rates and consent card return for high school immunisations. Fantastic, easy-to-use product that will shorten my communications time considerably.

Mick T

SMSBroadcast provides exactly what we need to keep in contact with our customers without the need for a phone call. The provided API is easy to understand and integrated into our unique software flawlessly. Will definitely keep topping up our account!

InfoMedix S

Quick and reliable service, and the API is easy to integrate with other software.

Robert T

I use the SMS Broadcast service to send appointment reminders. My initial enquiries were answered promptly and fully by the SMS Broadcast staff, which allowed me to get up and running immediately. Now, a simple shell script interrogates my database of bookings and sends me an alert and, with a mouse click, an SMS is sent to up to three recipients. Fully automating the SMS would actually have been easier but my requirements called for "semi-automation". This service exactly suits my needs. Robert Thorsby

James C

SMS Broadcast is the platform we trust to deliver important and up-to-date information to our customers living in remote locations of their online purchases from payment approval to shipping details. SMS Broadcast has proven to integrate easily into our online communications and shown to be reliable across any mobile provider our customers use.

David L

SMS Broadcast have been really easy to use. My developers were able to incorporate their service into our systems with minimal effort and the reporting has all we need. The prices are the best around and we couldn't be happier

Tim W

SMS Broadcast is a fantastic, easy to use service. A great way to touch base with customers, and manage their engagement with the business. With the ability to receive message back to a standard email makes responses from Customer Support easy to facilitate. I'm looking forward to getting my tech team into the API, and really make it integrated

michael l

quick and simple to use as a small business, actually great for business of any scale. Used sms broadcast when at a larger firm. The larger scale use can use API and the options are endless.

Tuan N

Lowest rates around, support from the team is fantastic and api integration is straightforward. Excellent in every way!

Natasha D

SMS Broadcast was easy to set up and link to my other data bases. Prices were really competative

Bryn R

Very simple, easy to use API. Was up and running in 10 minutes.

Bronson B

Very competitive pricing, easy to use web interface, has an API so you can create your own custom front-end (which we have done). Highly recommended!!

Waide S

Such an easy service to setup, the API is really useful for programmers and the overall use of the site is kept nice and simple.

SMS broadcast

proudly works on all Australian networks