# bimartmessage

> bimart_message

Latest version **1.1.3** (published 2017-05-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install bimartmessage
pnpm add bimartmessage
yarn add bimartmessage
bun add bimartmessage
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.3 |
| Published | 2017-05-04 |
| First published | 2017-04-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 7 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Ryan |
| Maintainers | lxlhum |
| Keywords | bimartmessage |

## Links

- npm: https://www.npmjs.com/package/bimartmessage
- Repository: https://github.com/lxlhum/bimart_message
- Homepage: https://github.com/lxlhum/bimart_message#readme
- Issues: https://github.com/lxlhum/bimart_message/issues
- npm.io page: https://npm.io/package/bimartmessage

## Dependencies (7)

- [md5](https://npm.io/package/md5.md) ^2.2.1
- [muk](https://npm.io/package/muk.md) ^0.5.3
- [crypto](https://npm.io/package/crypto.md) 0.0.3
- [urllib](https://npm.io/package/urllib.md) ^2.22.0
- [expect.js](https://npm.io/package/expect.js.md) ^0.3.1
- [body-parser](https://npm.io/package/body-parser.md) ^1.16.1
- [querystring](https://npm.io/package/querystring.md) ^0.2.0

## Recent versions

- 1.1.3 (latest) — 2017-05-04
- 1.1.2 — 2017-04-26
- 1.1.1 — 2017-04-26
- 1.1.0 — 2017-04-26
- 1.0.0 — 2017-04-25

## README

#票市通对接云之讯短信接口

例子如下

```
var API = require('bimartmessage');
/**
 * API构造函数
 * 
 * @param {String} accountSid 开发者账号ID,注册云之讯官网，在控制台中即可获取此参数
 * @param {String} authToken 账户授权令牌,相当于开发者账号ID（Account Sid）的密码,注册云之讯官网，在控制台中即可获取此参数
 */
var api = new API("accountSid", "authToken");
/**
 * API-发送验证码接口
 * 
 * @param {String} appId 云之讯不同应用都会有一个唯一的AppId
 * @param {String} code 验证码信息，如果有多个参数则需要写在同一个字符串中，以逗号分隔. （如：param=“a,b,c”）
 * @param {String} templateId 短信模板Id
 * @param {String} phoneNo 接收短信的手机号码
 * @param {Function} callback 回调函数的参数(err, data, res)
 */
api.identifyingCode("appId", "code", "templateId", "phoneNo", function (err, data, res) {
    console.log("回调函数");
    console.log(res.statusCode);
    console.log(res.headers);
    console.log(data.toString());
    var testJson = JSON.parse(data.toString());
    try {
        console.log(api.checkConfig[testJson.resp.respCode]);
    } catch (err) {
        console.log(err);
    }
});



```
报错编码

```
{
    "0": "发送成功",
    "000000": "发送成功",
    "105100": "短信服务请求异常",
    "105101": "url关键参数为空",
    "105102": "号码不合法",
    "105103": "没有通道类别",
    "105104": "该类别为冻结状态",
    "105105": "没有足够金额",
    "105106": "不是国内手机号码并且不是国际电话",
    "105107": "黑名单",
    "105108": "含非法关键字",
    "105109": "该通道类型没有第三方通道",
    "105110": "短信模板ID不存在",
    "105111": "短信模板未审核通过",
    "105112": "短信模板替换个数与实际参数个数不匹配",
    "105113": "短信模板ID为空",
    "105114": "短信内容为空",
    "105115": "短信类型长度应为1",
    "105116": "同一天同一用户不能发超过3条相同的短信",
    "105117": "模板ID含非法字符",
    "105118": "短信模板有替换内容，但参数为空",
    "105119": "短信模板替换内容过长，不能超过70个字符",
    "105120": "手机号码不能超过100个",
    "105121": "短信模板已删除",
    "105122": "同一天同一用户不能发超过N条验证码",
    "105123": "短信模板名称为空",
    "105124": "短信模板内容为空",
    "105125": "创建短信模板失败",
    "105126": "短信模板名称错误",
    "105127": "短信模板内容错误",
    "105128": "短信模板id为空",
    "105129": "短信模板id不存在",
    "103123": "未上线应用不能超过100个client",
    "103124": "已经是开通状态",
    "103125": "子账号余额不足",
    "103126": "未上线应用或demo只能使用白名单中号码",
    "103127": "测试demo不能创建子账号",
    "105130": "30秒内不能连续发同样的内容",
    "105131": "30秒内不能给同一号码发送相同模板消息",
    "105132": "验证码短信参数长度不能超过10位",
    "105139": "补发短信模板不规范"
}
```

---
_Source: https://npm.io/package/bimartmessage · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
