# ali-sms

> nodejs sdk for aliyun sms

Latest version **1.0.3** (published 2017-07-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install ali-sms
pnpm add ali-sms
yarn add ali-sms
bun add ali-sms
```

## 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.0.3 |
| Published | 2017-07-03 |
| First published | 2016-11-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=6 |
| Dependencies | 3 |
| Known vulnerabilities | 0 (+2 in 2 direct dependencies) |
| Install scripts | no |
| Author | tsq |
| Maintainers | tangshiqiang |
| Keywords | aliyun, sms, ali |

## Links

- npm: https://www.npmjs.com/package/ali-sms
- Repository: https://github.com/tsq/ali-sms
- Homepage: https://github.com/tsq/ali-sms#readme
- Issues: https://github.com/tsq/ali-sms/issues
- npm.io page: https://npm.io/package/ali-sms

## Dependencies (3)

- [uuid](https://npm.io/package/uuid.md) ^3.1.0
- [debug](https://npm.io/package/debug.md) ^2.3.3
- [request](https://npm.io/package/request.md) ^2.79.0

## Alternatives

- [vest](https://npm.io/package/vest.md) — 50.1K weekly downloads
- [@regle/core](https://npm.io/package/@regle/core.md) — 47.0K weekly downloads
- [typeof-arguments](https://npm.io/package/typeof-arguments.md) — 12.5K weekly downloads
- [@lokalise/projects-engine-contracts](https://npm.io/package/@lokalise/projects-engine-contracts.md) — 978 weekly downloads
- [@osjwnpm/nam-laboriosam-quibusdam](https://npm.io/package/@osjwnpm/nam-laboriosam-quibusdam.md) — 70 weekly downloads

## Recent versions

- 1.0.3 (latest) — 2017-07-03
- 1.0.2 — 2017-06-03
- 1.0.1 — 2016-12-06
- 1.0.0 — 2016-11-23

## README

# ali-sms
[![Build Status](https://travis-ci.org/tsq/ali-sms.svg?branch=master)](https://travis-ci.org/tsq/ali-sms)

Nodejs SDK for [Aliyun SMS service](https://www.aliyun.com/product/sms)

## Install

```
npm install ali-sms --save
```

## Usage

```javascript
const sms = require("ali-sms");
const accessKeyID     = process.env.ALI_SMS_ACCESSKEYID;
const accessKeySecret = process.env.ALI_SMS_ACCESSKEYSECRET;

const config = {
  accessKeyID       : accessKeyID,
  accessKeySecret   : accessKeySecret,
  paramString       : {code: '123456'},
  recNum            : ['1891234567'],
  signName          : 'alibaba',
  templateCode      : 'SMS_28100008',
};
sms(config, (err, body) => {
  console.log(err, body);
});
```

## Config 

param|type|description
----|----|--------------
accessKeyID | string | access key id, get from aliyun
accessKeySecret | string | access key secret, get from aliyun 
paramString | object | ali sms param which you have defined on aliyun sms dashboard
recNum | array | phone numbers of users
signName | string | ali sms param, get from aliyun sms dashboard
templateCode | string | ali sms param, get from aliyun sms dashboard

## Note
From 2017.06.22, Aliyun has [upgraded the sms service](https://help.aliyun.com/document_detail/55501.html). For a new sms user, Aliyun
forces you using the new sms service. So, your sms dashboard should be `https://dysms.console.aliyun.com/dysms.htm`. But for an old sms user,
you can still use the old sms service and your sms dashboard should be `https://mns.console.aliyun.com/#/home/cn-hangzhou`. If you are 
the old sms user. Please install version `1.0.2`

```
npm install ali-sms@1.0.2
```

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