Git Product home page Git Product logo

movesms's Introduction

Laravel / PHP Movesms

Latest Version on Packagist GitHub code size in bytes Travis (.com) Build Scrutinizer code quality Scrutinizer build Total Downloads

The Laravel / PHP SDK for Movetech Solutions' Bulk SMS API (Movesms). See their Bulk SMS API for more details.

Installation

You can install the package via composer:

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:

$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

$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

$res = Savannabits\Movesms\Movesms::checkBalance($apiKey);

Testing

composer test

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

movesms's People

Contributors

coolsam726 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.