MagfaSMS SDK
A JavaScript SDK for integrating applications with the MagFa SMS HTTP API.
MagfaSMS SDK provides a simple asynchronous interface for sending SMS messages, checking account balance, retrieving incoming messages, and tracking delivery status.
Package Information
| Property | Value |
|---|---|
| Package | magfa-sdk |
| Registry | npm |
| Latest Version | |
| Runtime | Node.js |
| HTTP Client | Axios |
Resources
- Source Code: GitLab Repository
- Package Registry: npm
- Documentation: MagfaSMS Docs
Installation
Quick Start
import MagFa from "magfa-sdk";
const sms = new MagFa("username", "password", "domain", "3000xxxxxxx");
// Check account balance
const result = await sms.balance();
if (result.status === 0) {
console.log(result.balance);
} else {
console.log(sms.error(result.status));
}
The constructor accepts your MagFa username, password, domain, and sender number.
Available Features
- Check account balance
- Send SMS messages
- Retrieve incoming messages
- Check message delivery status
- Translate MagFa status codes into readable error messages
For complete API references and examples, visit the official documentation.
License
See the source repository for licensing information.