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);

Anonymous

The API works great, I've had a 100% success rate in delivered messages and the live chat support is very helpful.

Ashley W

This is a great tool. The API is simple to use and the service delivers exactly as advertised. I use it as a hobbyist to track the status of home automation projects.

Kenneth S

Excellent rates, easy setup. Great integration with my database platform.

Anonymous

SMS Broadcast allows us to inform customers the requested orders are in our shop. It's very easy to use and efficient

Daryl K

Has an easy to use API that is available for most Programming Languages.

Lorraine J

With SMS Broadcast we are able to send SMS reminders to our customers from within our management software. So convenient, and a reply is delivered to our inbox. We needed some assistance from SMS Broadcast Technical Support in the initial set up and they replied to our request quickly and had us up and running in no time. Fantastic service.

Peter T

Needed to send a group SMS out when certain emails hit our Support desk. This service is simple, instant and affordable to setup.

Murray S

With the winding up of the 2G network together with lack of function in our obsolete SMS software we were forced to find another solution for sending out appointment reminders for our small business. I decided to try smsbroadcast and took advantage of their 25 free SMS trial to check how easily we could integrate it into our workflow. The clear instructions and helpful customer support allowed me to easily incorporate it into our bespoke solution and we were up and running quickly. The ease of use for us now is well above our previous level, and the cost is substantially lower - I wish I had swapped to smsbroadcast much sooner.

Neil A

We needed a simple way to use sms's for sending reminders and alerts programatically from our database. SMS Broadcast was not only very affordable but was easy to implement. Highly recommended.

Peter B

This is the easiest SMS platform I have ever used. A nice user dashboard, simple to use. Integrates well with our CRM too, big bonus. I even have an account with a competitor, with credits still available. yet I've switched over to SMS Broadcast.

Ben G

The service was very easy to set up and messages easy to send from the website and it integrates with our CRM system. I was called after I set up the account to see if I needed any assistance which was appreciated. Happy to recommended SMS Broadcast

marc n

It is simple, it works. It integrates. I am very happy to use the service and would recommend it to others.

Simon D

Found the whole process in setting up extremely smooth and has now added value to our workshop job system. We are now able to txt our customers when their jobs are completed.

Graeme L

I was able to interface my software to the SMS system easily. I was able to send SMS Texts and receive responses within the hour. Contacted the company with a couple of questions and they were answered promptly. So far this has been a good experience.

Kevin P

SMS Broadcast is very easy to use and setting up to work with our in-house software was straight forward. The rate for the introduction offer was very attractive. Overall, great service, highly recommended.

Mia D

Very happy with the SMSBroadcast service. It was a quick and easy process to set up and it integrates with our business software streamlining our processes and communication.

Dr K

A very slick and simple way of incorporating our data base and modifying our needs for our specialist dental practice. Allows access from any site and messages and reminders can be incorporated easily from templates and existing practice software. Highly recommended even for those with limited IT experience !

Desley P

I am a software developer. It was very simple and easy to setup sms sending from my software.

Phillip H

It was really simple to get up and running, API documentation is well written. Message delivery is quick and other useful facilities are included such as a configurable balance alert tool. SMS Broadcast is miles ahead of the provider I came from in terms of functionality. It's a pleasure to use your service and no hesitation to recommend your service to others.

Tim D

Smsboadcast is a simple, fast and reliable service. It integrated easily into our system. We are satisfied so far.

Stewart A

Very cheap messaging, but super fast as well. We use the API to send messages straight from our software and it was really easy to implement with only a few lines of code. They use secure SSL through the website so we know that our information is safe. Next up we will implement return texts, which should be straightforward using their service. -Stewart, programmer and business owner.

SMS broadcast

delivers to all Australian mobiles through on-shore connections