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

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.

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

SMS broadcast

delivers to all Australian mobiles through on-shore connections