https://github.com/savannabits/movesms
Laravel and PHP adapter for sending SMS using Movesms (Movetech Solutions Bulk SMS)
https://github.com/savannabits/movesms
bulk-sms bulksms bulksms-api laravel movesms movetech php savannabits sdk
Last synced: 3 months ago
JSON representation
Laravel and PHP adapter for sending SMS using Movesms (Movetech Solutions Bulk SMS)
- Host: GitHub
- URL: https://github.com/savannabits/movesms
- Owner: savannabits
- License: mit
- Created: 2021-04-22T11:31:41.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-02-02T23:25:31.000Z (over 3 years ago)
- Last Synced: 2025-01-06T17:49:59.034Z (5 months ago)
- Topics: bulk-sms, bulksms, bulksms-api, laravel, movesms, movetech, php, savannabits, sdk
- Language: PHP
- Homepage:
- Size: 27.3 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Laravel / PHP Movesms
[](https://packagist.org/packages/savannabits/movesms)




[](https://packagist.org/packages/savannabits/movesms)The Laravel / PHP SDK for Movetech Solutions' Bulk SMS API (Movesms). See their [Bulk SMS API](https://developers.movesms.co.ke/start.html) for more details.
## Installation
You can install the package via composer:
```bash
composer require savannabits/movesms
```## Usage
### Required API Params:
* username - Your account Username
* api_key - Your API Key
* sender - Your Sender ID
* to - Your Recipients separated by commas
* message - Your Text Message
* msgtype - Type of the message (use 5 for plain sms)
* dlr - Type of Delivery Report(use 0 for no delivery Report)### Send Bulk SMS:
```php
$username = "YOUR MOVETECH USERNAME";
$senderId = "YOUR MOVETECH SENDER ID";
$apiKey = "YOUR MOVETECH API KEY";$recipients = ["+254xxxxxx"]; //Array of recipient phone numbers in international format
$message = "Hello World! Here is my message.";$res = Savannabits\Movesms\Movesms::init($username,$apiKey, $senderId)
->to($recipients)
->message($message)
->send();
// Returns a php object with the following format:
$res = [
"success" => true, //boolean
"message" => "Message Sent:1701" // Or the error in case success = false
];```
### Schedule SMS to send Later
```php
$scheduleAt = '2021-04-24 14:04:00'; // Time in the format Y-m-d H:i:s
$res = Savannabits\Movesms\Movesms::init($username,$apiKey, $senderId)
->to($recipients)
->message($message)
->sendLater($scheduleAt);
```
### Check credit Balance
```php
$res = Savannabits\Movesms\Movesms::checkBalance($apiKey);
```### Testing
``` bash
composer test
```### Changelog
Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.
## Contributing
Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
### Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
## Credits
- [Sam Maosa](https://github.com/savannabits)
- [All Contributors](../../contributors)## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.