SMS Text API Gateway - Easy Integration Any Language

Create your account, paste the code, send texts - simple!

<?php
	// Textlocal account details
	$username = urlencode('youremail@address.com');
	$hash = urlencode('Your API hash'); // Get this when logged in at https://control.txtlocal.co.uk/docs/
	
	// Message details
	$numbers = urlencode(447123456789,447987654321);
	$sender = urlencode('Textlocal');
	$message = urlencode('This is your message');

	// Prepare data for POST request
	$data = 'username=' . $username . '&hash=' . $hash 
	  . '&numbers=' . $numbers . "&sender=" . $sender . "&message=" . $message;
 
	// Send the GET request with cURL
	$ch = curl_init('https://api.txtlocal.com/send/?' . $data);
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
	$response = curl_exec($ch);
	curl_close($ch);
	
	// Process your response here
	echo $response;
?>

Integrate any application with Textlocal using our simple API gateway and send SMS instantly. Whether your application is for web, desktop or mobile we support it. There are many code examples in multiple languages to get you started and what you do from there is up to you, the possibilities really are endless. Of course, the API is not all about sending SMS, you can send MMS messages too as well as schedule messages, manage contacts, retrieve inbound messages and so much more. Why not take a look at the features below and get the ball rolling on your project!

Easily integrate SMS features with your app

Who's using Textlocal

Still using our old API?

Top