Skip to content

Integration of Bandwidth's SMS service, with ClearBlade IoT Platform.

Notifications You must be signed in to change notification settings

yashjain28/bandwidth-sms-library

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ipm package: bandwidth-sms-library

Overview

Bandwidth is a notification service trusted by developers and marketers for time-savings, scalability and delivery expertise.

To get an overview of Bandwidth features and functionality click here.

If any suggestions or addition of new methods create a pull request. For further support, comment or create issues on this repo.

This is an ipm package, which contains one or more reusable assets within the ipm Community.

Browse ipm Packages

Setup

  • Get in touch with Bandwidth Support to Create an Account
  • Update the code/libraries/BandwidthConfig library with the relevant credentials.
const BandwidthConfig = {
  APITOKEN: "4ddb24d06069ef6adaaaaaa8e9d9ef02431664sdsd9100",
  APISECRET: "8sdsasasasdd6ba6996631cc9ea6f8595eb2bfaeasae5e",
  ORIGIN_NUMBER: "+15557778888",
  ACCOUNT_ID: "000000",
  APPLICATION_ID: "7aasdaxa1-e28f-4940-af6e-hbcc4814752",
};

Usage

Run ExampleBandwidthSendSMS Code Service, also here for reference:

var bwconf = BandwidthConfig;
var bandwidth = Bandwidth(bwconf);

bandwidth.sendSMS("You just received a message from Bandwidth through ClearBlade", ["+15556667777"], "test message", function (err, data) {
    if (err) {
        resp.error(err);
    }
    resp.success(data);
});

API

Constants

BandwidthConfig

Type: Configuration Description: A library that contains a key-value object to be used as constants.

Typedefs

callback : function

This callback is displayed as part of this Library.

BandwidthConfig : Object

Sends a text message using Bandwidth's REST API.

BandwidthConfig

Type: Configuration Description: A library that contains a key-value object to be used as constants.

Kind: global constant

callback : function

This callback is displayed as part of this Library.

Kind: global typedef

Param Type
err Object
resp Object

BandwidthConfig : Object

Sends a text message using Bandwidth's REST API.

Kind: global typedef

Param Type Description
APITOKEN string Bandwidth API apiToken ex. "BC218b72987d86855a5adb921370115a20"
APISECRET string Bandwidth API apiSecret ex. "4579ac6ba4fae7b452c03c64aeae40e7"
ORIGIN_NUMBER string Origin phone number of text message, ex "+15127132783"
ACCOUNT_ID string bandwidth account ID ex: "5000001"
APPLICATION_ID string create an application "7cd937a1-aaaa-4444-af6e-df56c4814752"

Example

var bwconf = BandwidthConfig;
var bandwidth = Bandwidth(bwconf);

About

Integration of Bandwidth's SMS service, with ClearBlade IoT Platform.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published