PHPackages                             mahoujas/smsowl - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. mahoujas/smsowl

ActiveLibrary[API Development](/categories/api)

mahoujas/smsowl
===============

This is PHP wrapper for SmsOwl REST API.

v1.0.3(10y ago)029MITPHPPHP &gt;=5.3.0

Since Jul 26Pushed 10y agoCompare

[ Source](https://github.com/mahoujas/smsowl-php)[ Packagist](https://packagist.org/packages/mahoujas/smsowl)[ Docs](https://smsowl.in)[ RSS](/packages/mahoujas-smsowl/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (7)Used By (0)

Sms Owl PHP Wrapper
-------------------

[](#sms-owl-php-wrapper)

This package is wrapper of Sms Owl REST API hosted at . Sms Owl provides transactional and promotional SMS Gateway services.

### Installing Sms Owl library

[](#installing-sms-owl-library)

You can download library in two ways.

1. Using composer.
2. Download PHP file directly.

#### 1. Using Composer

[](#1-using-composer)

Install composer in your project. Skip this step if you already have composer.

```
curl -sS https://getcomposer.org/installer | php

```

a. Install the library using either following command

```
 php composer.phar require mahoujas/smsowl

```

b. Or by adding library to composer.json and running update command

```
{
    "require": {
        "mahoujas/smsowl": "^1.0.0"
    }
}

php composer.phar update

```

Autoload the classes. Skip this step if you already done it.

```
require 'vendor/autoload.php';

```

#### 2. Download PHP library directly

[](#2-download-php-library-directly)

Download PHP library directly from this [link](https://raw.githubusercontent.com/mahoujas/smsowl-php/master/src/mahoujas/smsowl/smsowl.php)

Include download file in your project.

```
include("/path-to-file/smsowl.php");

```

### Use namespaces

[](#use-namespaces)

After you have downloaded and included library using either of above method, use the following namespace to access the class.

```
use Mahoujas\SmsOwl\SmsOwl;
use Mahoujas\SmsOwl\SmsType;

```

### Initialize the object

[](#initialize-the-object)

Credentials should be configured before sending SMS. Credential should be passed as constructor argument for SmsOwlClient constructor

```
$smsOwl = new SmsOwl("YOUR-ACCOUNT-ID", "YOUR-API-KEY");

```

### Sending promotional SMS

[](#sending-promotional-sms)

##### sendPromotionalSms(senderId,to,message,smsType)

[](#sendpromotionalsmssenderidtomessagesmstype)

- senderId: Sender Id registered and approved in Sms Owl portal.
- to: Either single number with country code or array of phone numbers.
- message: Message to be sent.
- smsType: It can have either of two values `normal` or `flash` (optional)

    ```
     try{
        $smsId  = $smsOwl->sendPromotionalSms("TESTER", "+9189876543210", "Hello PHP", SmsType::FLASH);
        	//Process smsId if you need to
     }
     catch(Exception $e){
         //Handle exception.
     }

    ```

Return value is Sms Id for single SMS or array of SMS ids for Bulk Sms

##### sendPromotionalSms(senderId,to,message)

[](#sendpromotionalsmssenderidtomessage)

Same as above but smsType defaults to `SmsType::NORMAL`

### Sending Transactional SMS

[](#sending-transactional-sms)

##### sendTransactionalSms(senderId,to,templateId,placeholderArray);

[](#sendtransactionalsmssenderidtotemplateidplaceholderarray)

- senderId: Sender Id registered and approved in Sms Owl portal.
- to: Destination number with country prefix. Only single number can be specified.
- templateId: Template Id of message. Only template message can be send via transactional route.
- placeholderArray: Placeholder values.

Lets assume templateId of `39ec9de0efa8a48cb6e60ee5` with following template.

```
Hello {customerName}, your invoice amount is Rs. {amount}.

```

-

```
try{
    $smsId  = $smsOwl->sendTransactionalSms("TESTER", "+919876543210", "39ec9de0efa8a48cb6e60ee5",array('customerName' => 'Bob', 'amount' => '200' });
    //Process smsid if needed.
}
}catch(Exception $e){
    //Handle exception
}

```

Return value is Sms Id.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~16 days

Total

6

Last Release

3865d ago

Major Versions

0.0.1 → v1.0.02015-07-26

### Community

Maintainers

![](https://www.gravatar.com/avatar/fda93166d2c0496eb3f430275d07fa6e2352433da70e39b6b8c027ae41733130?d=identicon)[mahoujas](/maintainers/mahoujas)

---

Top Contributors

[![pavanputhra](https://avatars.githubusercontent.com/u/6524792?v=4)](https://github.com/pavanputhra "pavanputhra (6 commits)")

---

Tags

smsbulk-smstransactional smssmsowlpromotional smssms india

### Embed Badge

![Health badge](/badges/mahoujas-smsowl/health.svg)

```
[![Health](https://phpackages.com/badges/mahoujas-smsowl/health.svg)](https://phpackages.com/packages/mahoujas-smsowl)
```

###  Alternatives

[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[aloha/twilio

Twilio API for Laravel

4733.6M5](/packages/aloha-twilio)[plivo/plivo-php

A PHP SDK to make voice calls &amp; send SMS using Plivo and to generate Plivo XML

1102.8M18](/packages/plivo-plivo-php)[plivo/php-sdk

A PHP SDK to make voice calls &amp; send SMS using Plivo and to generate Plivo XML

1101.9M5](/packages/plivo-php-sdk)[smsapi/php-client

SMSAPI API PHP Client

652.1M17](/packages/smsapi-php-client)[africastalking/africastalking

Official Africa's Talking PHP SDK

122557.6k10](/packages/africastalking-africastalking)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
