Tagget is written in nodeJS, and although it can be used in vanilla JavaScript or any other programming language, all examples in this guide will be written in nodeJS.
Sending a SMS message to a any phone number.
Create an account on Tagget and get your API credentials and replace the details int the code below.
Once you're strong enough, save the world:
send_sms.jsvar http = require("https");var options = {"method": "POST","hostname": "api.tagget.io","port": null,"path": "/engage/send_sms","headers": {"content-type": "application/json","cache-control": "no-cache"}};var req = http.request(options, function (res) {var chunks = [];res.on("data", function (chunk) {chunks.push(chunk);});res.on("end", function () {var body = Buffer.concat(chunks);console.log(body.toString());});});req.write(JSON.stringify({ id: 'YOUR_ID',token: 'YOUR_TOKEN',sender: 'Tagget',body: 'Hello world',to: '+195848757465' }));req.end();