# aliyun-openapi

> Aliyun OpenAPI

Latest version **0.1.9** (published 2023-10-10) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install aliyun-openapi
pnpm add aliyun-openapi
yarn add aliyun-openapi
bun add aliyun-openapi
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.1.9 |
| Published | 2023-10-10 |
| First published | 2023-07-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Node | >=20.0.0 |
| Dependencies | 0 |
| Unpacked size | 35.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | codit.run |
| Maintainers | xuxucode |
| Keywords | aliyun, openapi, sms, email |

## Links

- npm: https://www.npmjs.com/package/aliyun-openapi
- Repository: https://github.com/codit-run/aliyun-openapi
- Homepage: https://github.com/codit-run/aliyun-openapi#readme
- Issues: https://github.com/codit-run/aliyun-openapi/issues
- npm.io page: https://npm.io/package/aliyun-openapi

## Alternatives

- [@expo/fingerprint](https://npm.io/package/@expo/fingerprint.md) — 6.2M weekly downloads
- [@azure/monitor-opentelemetry-exporter](https://npm.io/package/@azure/monitor-opentelemetry-exporter.md) — 850.0K weekly downloads
- [@azure/monitor-opentelemetry](https://npm.io/package/@azure/monitor-opentelemetry.md) — 624.0K weekly downloads
- [@posthog/ai](https://npm.io/package/@posthog/ai.md) — 423.3K weekly downloads
- [fakefilter](https://npm.io/package/fakefilter.md) — 63.9K weekly downloads

## Recent versions

- 0.1.9 (latest) — 2023-10-10
- 0.1.8 — 2023-08-14
- 0.1.7 — 2023-07-28
- 0.1.6 — 2023-07-28
- 0.1.5 — 2023-07-26
- 0.1.4 — 2023-07-26
- 0.1.3 — 2023-07-25
- 0.1.0 — 2023-07-24

## README

# aliyun-openapi

[![npm][npm-img]][npm-url]
[![build status][build-img]][build-img]
[![npm download][download-img]][download-url]

[npm-img]: https://img.shields.io/npm/v/aliyun-openapi.svg
[npm-url]: https://www.npmjs.org/package/aliyun-openapi
[build-img]: https://github.com/codit-run/aliyun-openapi/actions/workflows/ci.yml/badge.svg
[build-url]: https://github.com/codit-run/aliyun-openapi/actions/workflows/ci.yml
[download-img]: https://img.shields.io/npm/dm/aliyun-openapi.svg
[download-url]: https://www.npmjs.org/package/aliyun-openapi

Aliyun OpenAPI

## Installation

```shell
$ npm install aliyun-openapi
```

## Open APIs

- SMS
- Email

## Usage

### SMS

```ts
import { AliyunClient, AliyunSmsOpenAPI } from 'aliyun-openapi'

const client = new AliyunClient({
  accessKeyId: 'your_access_key_id',
  accessKeySecret: 'your_access_key_secret',
  version: '2017-05-25',
  endpoint: 'dysmsapi.aliyuncs.com',
})
const openapi = new AliyunSmsOpenAPI(client)

await openapi.send('13812345678', 'TestSigner', 'SMS_12345678', { code: '123456' })
```

### Email

```ts
import { AliyunClient, AliyunEmailOpenAPI } from 'aliyun-openapi'

const client = new AliyunClient({
  accessKeyId: 'your_access_key_id',
  accessKeySecret: 'your_access_key_secret',
  version: '2015-11-23',
  endpoint: 'dm.aliyuncs.com',
})
const openapi = new AliyunEmailOpenAPI(client)

await openapi.send('noreply@test.com', 'alice@test.com', 'Verification Code', `<h2>Verification code: 123456<h2>`)
```

## TODO
- Monorepo
- Documentation

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