Merge branch 'master' of github.com:typpo/textbelt
This commit is contained in:
		@@ -1,5 +1,7 @@
 | 
			
		||||
### TextBelt
 | 
			
		||||
TextBelt (http://textbelt.com) is an outgoing SMS API that uses carrier-specific gateways to deliver your text messages for free, and without ads.  The service is fairly reliable and has sent over 100,000 texts.
 | 
			
		||||
TextBelt (http://textbelt.com) is a REST API that sends outgoing SMS. It is available as a public service or as an internally self-hosted server.
 | 
			
		||||
 | 
			
		||||
Textbelt uses carrier-specific gateways to deliver your text messages for free, and without ads.  The service is fairly reliable and has sent over 1 million texts.
 | 
			
		||||
 | 
			
		||||
Send a text with a simple POST request:
 | 
			
		||||
 | 
			
		||||
@@ -18,6 +20,8 @@ Sample success:
 | 
			
		||||
{"success":true}
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
Note that success means that the message was sent to Textbelt's list of providers.  We can't guarantee delivery on your network.
 | 
			
		||||
 | 
			
		||||
Sample failure:
 | 
			
		||||
 | 
			
		||||
```
 | 
			
		||||
@@ -74,6 +78,8 @@ Canadian and international support may not be complete.  Refer to the list of su
 | 
			
		||||
 | 
			
		||||
### Notes and Limitations
 | 
			
		||||
 | 
			
		||||
 * Some carriers are picky about which messages they deliver. A "success" response from Textbelt means that your message was given to the carrier.
 | 
			
		||||
 | 
			
		||||
 *  IP addresses are limited to 75 texts per day.  Phone numbers are limited to 3 texts every 3 minutes.  If you need increased limits, please contact admin@textbelt.com.
 | 
			
		||||
 | 
			
		||||
 *  Some carriers may deliver text messages from "txt@textbelt.com"
 | 
			
		||||
 
 | 
			
		||||
@@ -4,6 +4,7 @@ var providers = require('./providers.js')
 | 
			
		||||
  , spawn = require('child_process').spawn;
 | 
			
		||||
 | 
			
		||||
var debugEnabled = false;
 | 
			
		||||
var fromAddress = 'foo@bar.com';
 | 
			
		||||
 | 
			
		||||
//----------------------------------------------------------------
 | 
			
		||||
/*
 | 
			
		||||
@@ -56,7 +57,7 @@ function sendText(phone, message, region, cb) {
 | 
			
		||||
  _.each(providers_list, function(provider) {
 | 
			
		||||
    var email = provider.replace('%s', phone);
 | 
			
		||||
    email = 'Subject: Text\r\n\r\n' + email;
 | 
			
		||||
    var child = spawn('sendmail', ['-f', 'txt2@textbelt.com', email]);
 | 
			
		||||
    var child = spawn('sendmail', ['-f', fromAddress, email]);
 | 
			
		||||
    child.stdout.on('data', output);
 | 
			
		||||
    child.stderr.on('data', output);
 | 
			
		||||
    child.on('error', function(data) {
 | 
			
		||||
 
 | 
			
		||||
@@ -16,7 +16,14 @@ app.set('view engine', 'jade');
 | 
			
		||||
 | 
			
		||||
app.use(express.cookieParser());
 | 
			
		||||
app.use(express.static(__dirname + '/public'));
 | 
			
		||||
app.use(express.bodyParser());
 | 
			
		||||
app.use(express.json());
 | 
			
		||||
app.use(express.urlencoded());
 | 
			
		||||
app.use(function(req, res, next) {
 | 
			
		||||
  // Enable CORS so sites can use the API directly in JS.
 | 
			
		||||
  res.header('Access-Control-Allow-Origin', '*');
 | 
			
		||||
  res.header('Access-Control-Allow-Headers', 'Origin, X-Requested-With, Content-Type, Accept');
 | 
			
		||||
  next();
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
// Enable log messages when sending texts.
 | 
			
		||||
text.debug(true);
 | 
			
		||||
 
 | 
			
		||||
@@ -35,7 +35,13 @@ body {
 | 
			
		||||
</div>
 | 
			
		||||
</div>
 | 
			
		||||
 | 
			
		||||
<p>TextBelt is an outgoing SMS API that uses carrier-specific gateways to deliver your text messages for free, and without ads.  The service is fairly reliable and has sent over 100,000 texts.</p>
 | 
			
		||||
<p>
 | 
			
		||||
TextBelt is a REST API that sends outgoing SMS. It is available as a public service or as an internally self-hosted server.
 | 
			
		||||
</p>
 | 
			
		||||
 | 
			
		||||
<p>
 | 
			
		||||
Textbelt uses carrier-specific gateways to deliver your text messages for free, and without ads.  The service is fairly reliable and has sent over 1 million texts.
 | 
			
		||||
</p>
 | 
			
		||||
 | 
			
		||||
<p>Send a text with a simple POST request:</p>
 | 
			
		||||
 | 
			
		||||
@@ -53,6 +59,8 @@ body {
 | 
			
		||||
<pre><code>{"success":true}
 | 
			
		||||
</code></pre>
 | 
			
		||||
 | 
			
		||||
<p>Note that success means that the message was sent to Textbelt's list of providers.  We can't guarantee delivery on your network.</p>
 | 
			
		||||
 | 
			
		||||
<p>Sample failure:</p>
 | 
			
		||||
 | 
			
		||||
<pre><code>{"success":false,"message":"Exceeded quota for this phone number."}
 | 
			
		||||
@@ -79,6 +87,7 @@ Canadian and international support may not be complete.  Please refer to the lis
 | 
			
		||||
<h3>Notes and Limitations</h3>
 | 
			
		||||
 | 
			
		||||
<ul>
 | 
			
		||||
<li><p>Some carriers are picky about which messages they deliver. A "success" response from Textbelt means that your message was given to the carrier.</p></li>
 | 
			
		||||
<li><p>IP addresses are limited to 75 texts per day.  Phone numbers are limited to 3 texts every 3 minutes.  To report abuse or request increased limits, please contact ianw_textbelt at ianww.com.</p></li>
 | 
			
		||||
<li><p>Some carriers may deliver text messages from "txt@textbelt.com"</p></li>
 | 
			
		||||
<li><p>Supported U.S. carriers: <span class="mute">Alltel, Ameritech, AT&T Wireless, Boost, CellularOne, Cingular, Edge Wireless, Sprint PCS, Telus Mobility, T-Mobile, Metro PCS, Nextel, O2, Orange, Qwest, Rogers Wireless, US Cellular, Verizon, Virgin Mobile.</span></p></li>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user