https://github.com/py-package/smssarara-node
This is a simple SMS sending and receiving and otp client. It uses SMS Sarara API to send and receive SMS.
https://github.com/py-package/smssarara-node
sms sms-gateway smssarara
Last synced: 10 months ago
JSON representation
This is a simple SMS sending and receiving and otp client. It uses SMS Sarara API to send and receive SMS.
- Host: GitHub
- URL: https://github.com/py-package/smssarara-node
- Owner: py-package
- License: mit
- Created: 2023-10-14T10:43:06.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-14T18:19:58.000Z (over 2 years ago)
- Last Synced: 2025-05-15T00:21:22.688Z (about 1 year ago)
- Topics: sms, sms-gateway, smssarara
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/smssarara
- Size: 48.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
### SMSSarara
This is a simple SMS sending and receiving and otp client. It uses [SMS Sarara API](https://smssarara.com) to send and receive SMS.
#### Installation
```bash
npm install smssarara
```
#### Usage
**Initialization**
```javascript
const SMSSarara = require("smssarara");
const sms = SMSSarara({
apiToken: "xxx-xxxxxxxxxx",
otpToken: "xxx-xxxxxxxxxx",
});
```
**Sending OTP**
```javascript
const response = await sms.sendOtp("9841xxxxxx");
console.log(response);
// sample response
{
status: "success",
message: "OTP sent successfully",
}
// or
{
status: "error",
message: "...",
}
```
**Verifying OTP**
```javascript
const response = await sms.verifyOtp("9841xxxxxx", "123456");
console.log(response);
// sample response
{
status: "success",
message: "OTP verified successfully",
}
// or
{
status: "error",
message: "...",
}
```