DEPRECATED - MMS Picture & Audio API Gateway

Instantly broadcast images, audio and video to any UK mobile handset

Choose an API

Overview

Textlocal's simple to use MMS API Gateway lets you integrate the power of MMS into your web-based application quickly and easily using any development language (PHP, ASP, .NET, Java etc). With a few simple lines of code you can send images, audi and video to every mobile phone in the UK.

You can integrate our MMS API into desktop applications, websites, smartphone apps. Below you will find code examples in a variety of programming languages to get you up and running immediately.

Code Examples

http://www.txtlocal.com/sendmmspost.php

We have a number of code examples available, however if you see a language that we don't have, please contact us, as it's more than likely we'll be able to pull on together for you.

				    	<?php
				        // Authorisation details
				        $uname = "youremailaddress";
				        $pword = "yourpassword";
				        
				        // Data for text message
				        $url = "http://www.textlocal.com/zips/sweetdreams.zip";
				        $subject = "My Subject";
				        $subject = urlencode($subject); //encode special characters (e.g. £,& etc)
				        $from = "07786200350";
				        $number = "447740101097";
				        
				        // Prepare data for POST request
				        $data = "uname=".$uname."&pword=".$pword."&url=".$url."&from=".$from;
				        $data .= "&number=".$number."&subject=".$subject; 
				        // Send the POST request with cURL
				        $ch = curl_init('http://www.txtlocal.com/sendmmspost.php');
				        curl_setopt($ch, CURLOPT_POST, true);
				        curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
				        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
				        $result = curl_exec($ch); //This is the result from Textlocal
				        curl_close($ch);
				        ?>
			    	

API Parameter Details

The following is a list of variables that can be defined: (* indicates optional)

uname Your Textlocal username.
pword Your Textlocal password.
from The message's sender ID. This value needs be purely numeric and must be between 3 and 11 characters in length.
url The URL of the Zip file containing your MMS message. Examples of MMS Zip files can be downloaded here and here.
number A comma-delimited list of mobile numbers in international format. Each number must be purely numeric, so no '+' symbols, hyphens or spaces.
The numbers must be prefixed with their international dialling codes. For example, United Kingdom numbers would look like {var_s:example_number}.
subject This field will populate the subject line of the message. This cannot more than 20 characters in length.

Debugging/Error Information

You can get two types of response from our Send MMS API. The following table shows the different outputs and responses accordingly.

Result Message ID
Success Confirmation of the message being received on our platform, with the telephone number it was sent to. *Please retain the ZIP file on your server for 24 hours so we can retry until accepted by mobile operator.*
Credits Number of credits used

Errors

From Address > 12 From field must be between 4 and 12 characters
From Address < 4 From field must be between 4 and 12 characters
Subject > 30 The subject line cannot be more than 30 characters
Invalid number The number provided is not valid - i.e. not UK mobile number
Invalid URL The URL is not valid
Invalid login Incorrect username and password/hash
No credit No MMS credits
File not found (404) The URL File was not found
Top