ippanel-sms
A professional, asynchronous Rust client library for the IPPANEL SMS web service. This crate provides a convenient and type-safe interface for sending SMS, managing patterns, checking credit, and more, making it easy to integrate IPPANEL SMS services into your Rust applications.
راهنما به زبان فارسی
Features
- Send single or bulk SMS messages
- Send pattern-based (templated) messages
- Fetch message statuses and details
- Create message patterns
- Retrieve account credit
- Fetch inbox messages
- Fully asynchronous
- Strongly typed models for all API responses
Installation
Add this to your Cargo.toml:
[]
= "<latest-version>"
Replace <latest-version> with the latest published version.
Usage
use IppanelClient;
async
Testing
Integration tests are provided in tests/integration.rs. To run the tests:
Required Environment Variables
The following environment variables must be set before running the tests:
IPPANEL_API_KEY– Your IPPANEL API keyIPPANEL_MOBILE_NUMBER– A recipient mobile number (for sending tests)IPPANEL_SENDER_NUMBER– Your sender number (for sending tests)IPPANEL_MESSAGE_ID– A valid message ID (for status and message fetch tests)IPPANEL_PATTERN_CODE– A valid pattern code (for pattern send tests)
- Set the required environment variables (see above).
- Run:
Note:
- The tests interact with the real IPPANEL API and may send actual SMS messages. Use test numbers and patterns where possible.
- Ensure your API key and other sensitive data are kept secure.
License
This project is licensed under the MIT License.