smspro/sms

v1.0.0 2025-06-11 17:31 UTC

This package is auto-updated.

Last update: 2025-06-11 18:14:03 UTC


README

Smspro

PHP SMS API Sending SMS via the SMSPRO SMS gateway

Build Status smspro-badge

Requirement

This library needs minimum requirement for doing well on run.

  • Sign up for a free SMSPRO account
  • Ask SMSPRO Team for new access_key for developers
  • SMSPRO SMS API client for PHP requires version 8.1.x and above

Installation via Composer

Package is available on Packagist, you can install it using Composer.

composer require smspro/sms

Or go to

Smspro-SMS-API-Latest Release

And download the full version

If you want to install a legacy version running with PHP7.4 Run composer with the command below

composer require smspro/sms "1.0.*"

Or Download it from Smspro-SMS-API-Legacy

Quick Examples

Sending a SMS
	$oMessage = \Smspro\Sms\Message::create('YOUR_PRO_API_KEY');
	$oMessage->from ='SenderId';
	$oMessage->to = '+254712509826,071250xxx';
	$oMessage->message ='Test sms from smspro';
	var_dump($oMessage->send());
Sending non customized sender SMS.
   $oBalance = \Smspro\Sms\Balance::create('YOUR_PRO_API_KEY');
	$response = $oBalance->get();
	$balance = $response->getBalance();
	$currency = $response->getCurrency();
	$rate = $response->getRate(); 
	echo "Your current balance is {$balance} {$currency} at a rate of {$rate}.\n";
Sending Bulk SMS from your Script

It is obvious that sending bulk data to any system is a problem! Therefore, you should check our recommendation for the best approach

WordPress Plugin

If you are looking for a powerful WordPress plugin to send SMS, then download our sms-pro-wp-plugin

Resources