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 NowSend SMS Texts using our XML API
Use an XML format to send SMS messages
We also offer a bulk XML interface for sending different messages to multiple recipients in bulk. This option is perfect for mail-merging text. We recommend no more than 500
Post your requests to http://www.txtlocal.com/xmlapi.php
Use 1 'SMS' tag per submission
Each message should be contained in a 'Msg' tag
If necessary, specify the custom ID in the 'ID' property
If necessary, specify a receipt notification URL in the 'rcpurl' property
Code Examples
We have a number of code examples available, however if you see a language that we don't have, please contact us and we'll create one for you.
<?php $xmlData = ' <SMS> <Account Name="yourusername" Password="yourpassword" Test="0" Info="1" JSON="0"> <Sender From="Site 3" Sched="2012-01-21-14-59-00" rcpurl="http://yourdomain/yourreceiptscript.123"> <Messages> <Msg ID="15" Number="447123456789"> <Text></Text> </Msg> <Msg ID="16" Number="447123456789"> <Text></Text> </Msg> </Messages> </Sender> </Account> </SMS>'; $post = 'data='. urlencode($xmlData); $url = "http://www.txtlocal.com/xmlapi.php"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POST ,1); curl_setopt($ch, CURLOPT_POSTFIELDS ,$post); curl_setopt($ch, CURLOPT_RETURNTRANSFER ,1); $data = curl_exec($ch); curl_close($ch); echo $data; ?>
Debugging/Error Information
The following responses will be generated, accordingly:
| OK | The XML file has been received and processed |
|---|---|
| Error while parsing the document | The XML format is not valid |
| Error=Invalid login | Invalid username and/or password |
| Error - insufficient credits. You need: 10 credits | Insufficient credits |
Create Your Free Account - 60 Second Signup - Free Expert Support




