Created
September 10, 2019 15:16
-
-
Save typpo/9457886a7f86df013597b412af039829 to your computer and use it in GitHub Desktop.
Textbelt node example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var request = require('request'); | |
request.post('https://textbelt.com/text', { | |
form: { | |
phone: '5555555555', | |
message: 'Hello world', | |
key: 'textbelt', | |
}, | |
}, function(err, httpResponse, body) { | |
if (err) { | |
console.error('Error:', err); | |
return; | |
} | |
console.log(JSON.parse(body)); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment