Full Access - Free Credits
Takes 60 Seconds
Our Latest Reviews
View allView our Tutorials
See our latest Messenger video tutorials for help and advice on how to get started
Watch NowCheck Credit Balance via API
Check your SMS & MMS Credit Balance
Overview
http://www.txtlocal.com/getcredits.php
This interface allows you to remotely determine your Textlocal account balance. To connect to this interface, simply GET or POST your query to the URL below. For added security, connect to our API via SSL by replacing 'http' with 'https'.
Code Examples
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 create one for you.
<?php
// Authorisation details
$uname = "youremailaddress";
$pword = "yourpassword";
// Prepare data for POST request
$data = "uname=".$uname."&pword=".$pword; // Send the POST request with cURL
$ch = curl_init('http://www.txtlocal.com/getcredits.php');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$credits = curl_exec($ch); //This is the number of credits you have left
curl_close($ch);
?>
API Parameter List
The following is a list of variables that can be defined: (* indicates optional)
| uname | Your Textlocal username. |
|---|---|
| pword | Your Textlocal password. |
| mms * | Set to true if you require MMS Credit balance, otherwise do not set. |
Debugging/Error Information
The information passed back will be one of the following:
Invalid - meaning incorrect login details
A number, which relates to the number of credits available
Create Your Free Account - 60 Second Signup - Free Expert Support




