@bandwidth/messaging

中文文档
4.1.7发布于 2024/08/28MITTypeScriptESM + CJS近 30 天下载 12万

Bandwidth's HTTP Messaging platform

此软件包已被标记为弃用

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

原始使用文档
文档目录7 节
  1. Getting Started
  2. Installation
  3. Initialize
  4. Send A Text Message
  5. Supported Node Versions
  6. Documentation
  7. Credentials

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

版本与发布记录

@bandwidth/messaging 共发布 24 个版本,首次发布于 2019/12/13;过去 12 个月发布了 0 个版本。

版本发布日期距今
4.1.7latest2024/08/282 年前
4.1.62024/03/202 年前
4.1.52024/01/172 年前
4.1.42024/01/032 年前
4.1.32023/11/073 年前
4.1.22023/10/173 年前

关于 @bandwidth/messaging 的常见问题

@bandwidth/messaging 是什么?

Bandwidth's HTTP Messaging platform注意:该包已被作者标记为弃用——Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

如何安装 @bandwidth/messaging?

在项目目录运行 npm install @bandwidth/messaging,或使用 pnpm add / yarn add / bun add。

@bandwidth/messaging 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@bandwidth/messaging 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@bandwidth/messaging 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=10。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@bandwidth/messaging 可以商用吗?

@bandwidth/messaging 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@bandwidth/messaging 的下载量有多少?

根据 npm 官方下载统计,@bandwidth/messaging 在 2026/10/08 – 2026/11/06 这 30 天内被下载 119,541 次,日均约 3,985 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@bandwidth/messaging 还在维护吗?

最新版本 4.1.7 发布于 2024/08/28(2 年前);至今共发布 24 个版本,其中过去 12 个月发布了 0 个;首次发布于 2019/12/13。作者已将其标记为弃用,新项目建议寻找替代方案。