https://github.com/bandwidth/node-messaging
Node SDK for Bandwidth Messaging
https://github.com/bandwidth/node-messaging
Last synced: 6 months ago
JSON representation
Node SDK for Bandwidth Messaging
- Host: GitHub
- URL: https://github.com/bandwidth/node-messaging
- Owner: Bandwidth
- License: other
- Created: 2019-10-29T17:18:15.000Z (about 6 years ago)
- Default Branch: main
- Last Pushed: 2025-03-29T04:43:40.000Z (9 months ago)
- Last Synced: 2025-04-12T04:44:05.558Z (9 months ago)
- Language: TypeScript
- Homepage: https://dev.bandwidth.com
- Size: 1.65 MB
- Stars: 5
- Watchers: 5
- Forks: 3
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# $${\color{orange}This \space package \space has \space been \space deprecated}$$
# Please use the new [node-sdk](https://github.com/Bandwidth/node-sdk)
## The new package is on NPM as [bandwidth-sdk](https://www.npmjs.com/package/bandwidth-sdk) (`npm i bandwidth-sdk`)
# Bandwidth Node Messaging SDK
[](https://github.com/Bandwidth/node-messaging/actions/workflows/test.yml)
| **OS** | **Node** |
|:------------:|:---:|
| Windows 2022 | 12, 14, 16 |
| Windows 2025 | 12, 14, 16 |
| Ubuntu 22.04 | 12, 14, 16 |
| Ubuntu 24.04 | 12, 14, 16 |
Note: As of version 3.0.0, this package has been upgraded to TypeScript
## Getting Started
### Installation
```
npm install @bandwidth/messaging
```
### Initialize
```js
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
```js
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