Skip to content

Repository files navigation

$${\color{orange}This \space package \space has \space been \space deprecated}$$

Please use the new node-sdk

The new package is on NPM as bandwidth-sdk (npm i bandwidth-sdk)

Bandwidth Node Messaging SDK

Test

OSNode
Windows 202212, 14, 16
Windows 202512, 14, 16
Ubuntu 22.0412, 14, 16
Ubuntu 24.0412, 14, 16

Note: As of version 3.0.0, this package has been upgraded to TypeScript

Getting Started

Installation

npm install @bandwidth/messaging

Initialize

import{Client,ApiController,MessageRequest}from'@bandwidth/messaging';constclient=newClient({basicAuthUserName: "username",basicAuthPassword: "password"});constcontroller=newApiController(client);constaccountId="12345";

Send A Text Message

constapplicationId="3-a-b-c";consttoPhoneNumber="+15554443333";constfromPhoneNumber="+15553334444";consttext="Hello world";constbody={applicationId: applicationId,to: [toPhoneNumber],from: fromPhoneNumber,text: text};constcreateMessageResponse=awaitcontroller.createMessage(accountId,body);console.log(createMessageResponse.result.id);

Supported Node Versions

This package can be used with Node >= 10

Documentation

Documentation for this package can be found at https://dev.bandwidth.com/sdks/node.html

Credentials

Information for credentials for this package can be found at https://dev.bandwidth.com/guides/accountCredentials.html

About

Node SDK for Bandwidth Messaging

Resources

Stars

5 stars

Watchers

4 watching

Forks

Releases

Packages

Used by

Contributors

Languages