# dsms

> DEXCHANGE-SMS npm package

Latest version **1.0.2** (published 2023-06-15) · ISC license · 0 weekly downloads

## Install

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

## 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.2 |
| Published | 2023-06-15 |
| First published | 2023-05-17 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 6.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 7 |
| Author | DENVER |
| Maintainers | denver022 |

## Links

- npm: https://www.npmjs.com/package/dsms
- Repository: https://github.com/Denver-sn/dexchange-sms-npm
- Issues: https://github.com/Denver-sn/dexchange-sms-npm/issues
- npm.io page: https://npm.io/package/dsms

## Dependencies (1)

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

## Recent versions

- 1.0.2 (latest) — 2023-06-15
- 1.0.1 — 2023-05-22
- 1.0.0 — 2023-05-17

## README

![COVER](https://github.com/GalsenDev221/made.in.senegal/blob/master/assets/cover.png)

<p align="center">
<a href="https://github.com/GalsenDev221/made.in.senegal"><img src="https://github.com/GalsenDev221/made.in.senegal/blob/master/assets/badge.svg"></a>
</p>

## DSMS - Node.js module for Dexchange SMS API


DSMS (DEXCHANGE-SMS) is a Node.js module that provides a simple way to interact with the Dexchange SMS API. With DSMS, you can send SMS messages and authenticate users via SMS.

[https://dexchange-sms.com](https://dexchange-sms.com/)

## Special thanks to [Arona GUEYE](https://github.com/arona504)  🚀

## Installation

```bash
npm install dsms
```

## Usage

### To use DSMS, you need to have an API key. You can get one by signing up at [Dexchange](https://dexchange-sms.com/auth/signup).

```javascript
const DSMS = require('dsms');
const dsms = new DSMS('your_api_key');

// Send an SMS message
dsms.sendSMS({
  number: ['221XXXXXXXXX'], // Phone number(s) in international format
  signature: 'DEXCHANGE', // Signature of the SMS
  content: 'Hello world!' // Content of the SMS
})
.then((response) => {
  console.log(response);
}).catch((error) => {
  console.error(error);
});

// Send an authentication SMS message
dsms.sendAuthSMS({
  number: '221XXXXXXXXX', // Phone number in international format
  service: 'my_service', // Name of your service
  lang: 'en' // Language of the SMS
})
.then((response) => {
  console.log(response);
}).catch((error) => {
  console.error(error);
});

// Verify an authentication SMS message
dsms.verifyAuthSMS({
  number: '221XXXXXXXXX', // Phone number in international format
  service: 'my_service', // Name of your service
  otp: '123456' // OTP code sent to the user
})
.then((response) => {
  console.log(response);
}).catch((error) => {
  console.error(error);
});

```

## Contributing

Pull requests are welcome. For major changes, please open an issue first
to discuss what you would like to change.

Please make sure to update tests as appropriate.



## License

[MIT](https://choosealicense.com/licenses/mit/)

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