BSG SMS Marketing

FREE
By kachinsky.n
Updated 4 months ago
2.4/10
Popularity Score
338ms
Latency
20%
Success Rate

BSG SMS Marketing API Documentation

BSG makes it easy to send bulk SMS messages all over the world over the fast Rest API for many languages. Other related services are HLR-Lookup (network query) and sending Viber mass campaigns

View API Details
SMS
PUT/rest/sms/create
GET/rest/sms/{id}
GET/rest/sms/{reference}
GET/rest/sms/task/
HLR
PUT/hlr/create
GET/hlr/{id}
GET/hlr/prices/{tariff}
Viber
POST/rest/viber/create
GET/rest/viber/{id}
GET/rest/viber/{reference}
PUT/rest/sms/create
Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
X-API-KEYSTRING
REQUIREDThe API key you need to have from BSG personal cabinet. It could be setted in SMPP/API key menu. Or by link: https://app.bsg.hk/user/settings/tab/keys
Required Parameters
/rest/sms model
REQUIRED
Code Snippet
unirest.put("https://kachinsky-n-bsg_test_sms-v1.p.rapidapi.com/rest/sms/create")
.header("X-RapidAPI-Host", "kachinsky-n-bsg_test_sms-v1.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.header("X-API-KEY", "live_aCnlYsqUcHN1aQmybnG5")
.header("Content-Type", "text/plain")
.send("{  \"destination\": \"phone\",  \"originator\": \"testsms\",  \"body\": \"message text\",  \"msisdn\": \"380505142320\",  \"reference\": \"sms08082018_01\"}")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
Sample Response
General
Request URL: https://kachinsky-n-bsg_test_sms-v1.p.rapidapi.com/rest/sms/create
Request Method: PUT
Response Headers
Response Body

Install SDK for NodeJS

Installing

To utilize unirest for node.js install the the npm module:

$ npm install unirest

After installing the npm package you can now start simplifying requests like so:

var unirest = require('unirest');

Creating Request

unirest.put("https://kachinsky-n-bsg_test_sms-v1.p.rapidapi.com/rest/sms/create")
.header("X-RapidAPI-Host", "kachinsky-n-bsg_test_sms-v1.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.header("X-API-KEY", "live_aCnlYsqUcHN1aQmybnG5")
.header("Content-Type", "text/plain")
.send("{  \"destination\": \"phone\",  \"originator\": \"testsms\",  \"body\": \"message text\",  \"msisdn\": \"380505142320\",  \"reference\": \"sms08082018_01\"}")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication