# @nextsms/js-client

> NextSMS SDK for Nodejs

Latest version **1.0.0** (published 2021-11-24) · MIT license · 0 weekly downloads

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

## Install

```sh
npm install @nextsms/js-client
pnpm add @nextsms/js-client
yarn add @nextsms/js-client
bun add @nextsms/js-client
```

## Health

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

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2021-11-24 |
| First published | 2021-01-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=12 |
| Dependencies | 1 |
| Unpacked size | 125.4 KB |
| Known vulnerabilities | 0 (+23 in 1 direct dependencies) |
| Install scripts | no |
| Author | Alpha Olomi |
| Maintainers | alphao |
| Keywords | nextsms, bulksms, tanzania, nextbyte |

## Links

- npm: https://www.npmjs.com/package/@nextsms/js-client
- npm.io page: https://npm.io/package/@nextsms/js-client

## Dependencies (1)

- [axios](https://npm.io/package/axios.md) ^0.24.0

## Recent versions

- 1.0.0 (latest) — 2021-11-24
- 0.0.4 — 2021-05-12
- 0.0.1 — 2021-01-17

## README

<h2 align="center"> NextSMS Client for Node.js</h2>

<p align="center"><a href="https://github.com/nextsms/js-client/actions/workflows/node.js.yml"><img src="https://github.com/nextsms/js-client/actions/workflows/node.js.yml/badge.svg" alt="Tests"></a></p>

<br>

The **NextSMS SDK** allows developers to easily integrate [NextSMS](https://nextsms.co.tz/) solutions in their Javascript code, and build robust applications and software.

## Documentation

Take a look at the [SDK docs here](hhttps://nextsms.github.io/js-client/).

## Usage

> **NOTE**: <br> > _Test Mode_ ONLY `Single destination` and `Multiple destinations` APIs support testing mode.

### Quick Examples

```sh
yarn add @nextsms/js-client
# or
npm i @nextsms/js-client
```

```js
import NextSMS from '@nextsms/js-client';

// Populate the credentials
const username = 'username';
const password = 'password';

// Initiate with credentials
let nextsms = new NextSMS({ username, password, environment: 'testing' });

const data = {
  from: 'NEXTSMS',
  to: '255123456789',
  text: 'Hello World',
};

// Send the sms
nextsms
  .singleDestination(data)
  .then(data => {
    // Print results
    console.log(data);
  })
  .catch(error => {
    console.log('error: ' + error);
  });
```

### Testing

```bash
yarn test
```

## Opening Issues

If you have a feature request or you encounter a bug, please file an issue on [our issue tracker on GitHub](https://github.com/nextsms/js-client/issues).

## Credits

- [Alpha Olomi](https://github.com/alphaolomi)
- [All Contributors](../../contributors)

## License

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

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