Skip to content

Instantly share code, notes, and snippets.

@typpo
Created September 10, 2019 15:16
Show Gist options
  • Select an option

  • Save typpo/9457886a7f86df013597b412af039829 to your computer and use it in GitHub Desktop.

Select an option

Save typpo/9457886a7f86df013597b412af039829 to your computer and use it in GitHub Desktop.

Revisions

  1. typpo created this gist Sep 10, 2019.
    15 changes: 15 additions & 0 deletions textbelt-example.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    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));
    })