4.1.6 • Published 2 months ago

@bandwidth/messaging v4.1.6

Weekly downloads
5,994
License
MIT
Repository
-
Last release
2 months ago

Bandwidth Node Messaging SDK

Test

OSNode
Windows 201612, 14, 16
Windows 201912, 14, 16
Ubuntu 20.0412, 14, 16
Ubuntu 22.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';
const client = new Client({
    basicAuthUserName: "username",
    basicAuthPassword: "password"
});

const controller = new ApiController(client);
const accountId = "12345";

Send A Text Message

const applicationId = "3-a-b-c";
const toPhoneNumber = "+15554443333";
const fromPhoneNumber = "+15553334444";
const text = "Hello world";
const body = {
    applicationId: applicationId,
    to: [toPhoneNumber],
    from: fromPhoneNumber,
    text: text 
};

const createMessageResponse = await controller.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

4.1.6

2 months ago

4.1.5

4 months ago

4.1.4

5 months ago

4.1.3

7 months ago

4.1.2

7 months ago

4.1.1

9 months ago

4.1.0

1 year ago

4.0.5

2 years ago

4.0.4

2 years ago

4.0.3

2 years ago

4.0.2

2 years ago

4.0.1

3 years ago

4.0.0

3 years ago

3.0.0

3 years ago

2.0.4

4 years ago

2.0.3

4 years ago

2.0.2

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago