PHPackages                             maazwebz/maazsms - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. maazwebz/maazsms

ActiveLibrary[HTTP &amp; Networking](/categories/http)

maazwebz/maazsms
================

MaazSMS API is build for MaazSMS - Bulk SMS Application For Marketing

06PHP

Since May 5Pushed 8y agoCompare

[ Source](https://github.com/maazwebz/maazsms)[ Packagist](https://packagist.org/packages/maazwebz/maazsms)[ RSS](/packages/maazwebz-maazsms/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

MaazSMS API
===========

[](#maazsms-api)

MaazSMS API is build for MaazSMS - Bulk SMS Application For Marketing

### Prerequisites

[](#prerequisites)

To run MaazSMS API you have to install MaazSMS Application on your server. For more details please visit: [MaazSMS](https://1.dialogsms.pro/)

```
php >=5.6
MaazSMS - Bulk SMS Application For Markting

```

### Installing

[](#installing)

Via Composer

```
composer require maazwebz/maazsms

```

And Via Bash

```
git clone https://github.com/maazwebz/maazsms.git

```

Usage
-----

[](#usage)

### Step 1:

[](#step-1)

If install MaazSMS API using Git Clone then load your MaazSMS API Class file and Use namespace.

```
require_once 'src/Class_Maaz_SMS_API.php';
use MaazSMS\MaazSMSAPI;
```

If install MaazSMS API using Composer then Require/Include autoload.php file in the index.php of your project or whatever file you need to use **MaazSMS API** classes:.

```
require 'vendor/autoload.php';
use MaazSMS\MaazSMSAPI;
```

### Step 2:

[](#step-2)

set your API\_KEY from `https://mywebhost.com/sms-api/info` (your application install url)

```
$api_key = 'YWRtaW46YWRtaW4ucGFzc3dvcmQ=';
```

### Step 3:

[](#step-3)

Change the from number below. It can be a valid phone number or a String

```
$from = '8801721000000';
```

### Step 4:

[](#step-4)

the number we are sending to - Any phone number

```
$destination = '8801810000000';
```

You have to must include Country code at beginning of the phone number.

### Step 5:

[](#step-5)

Replace your Install URL like `https://mywebhost.com/sms/api` with `https://1.dialogsms.pro/``sms/api` is mandatory on your install url

```
$url = 'https://1.dialogsms.pro/sms/api';
```

// SMS Body

```
$sms = 'test message from MaazSMS';
```

// Unicode SMS

```
$unicode = '1'; //For Unicode message
```

// Voice SMS

```
$voice = '1'; //For voice message
```

// MMS SMS

```
$mms = '1'; //For mms message
$media_url = 'https://yourmediaurl.com'; //Insert your media url
```

// Schedule SMS

```
$schedule_date = '09/17/2018 10:20 AM'; //Date like this format: m/d/Y h:i A
```

// Create Plain/text SMS Body for request

```
$sms_body = array(
    'api_key' => $api_key,
    'to' => $destination,
    'from' => $from,
    'sms' => $sms
);
```

// Create Unicode SMS Body for request

```
$sms_body = array(
    'api_key' => $api_key,
    'to' => $destination,
    'from' => $from,
    'sms' => $sms,
    'unicode' => $unicode,
);
```

// Create Voice SMS Body for request

```
$sms_body = array(
    'api_key' => $api_key,
    'to' => $destination,
    'from' => $from,
    'sms' => $sms,
    'voice' => $voice,
);
```

// Create MMS SMS Body for request

```
$sms_body = array(
    'api_key' => $api_key,
    'to' => $destination,
    'from' => $from,
    'sms' => $sms, //optional
    'mms' => $mms,
    'media_url' => $media_url,
);
```

// Create Schedule SMS Body for request

```
$sms_body = array(
    'api_key' => $api_key,
    'to' => $destination,
    'from' => $from,
    'sms' => $sms,
    'schedule' => $schedule_date,
);
```

### Step 6:

[](#step-6)

Instantiate a new MaazSMS API request

```
$client = new MaazSMSAPI();
```

Send SMS
--------

[](#send-sms)

Finally send your sms through MaazSMS API

```
$response = $client->send_sms($sms_body, $url);
```

Get Inbox
---------

[](#get-inbox)

Get your all message

```
$get_inbox=$client->get_inbox($api_key,$url);
```

Get Balance
-----------

[](#get-balance)

Get your account balance

```
$get_balance=$client->check_balance($api_key,$url);
```

Response
--------

[](#response)

MaazSMS API return response with `json` format, like:

```
{"code":"ok","message":"Successfully Send"}
```

Status Code
-----------

[](#status-code)

StatusMessage`ok`Successfully Send`100`Bad gateway requested`101`Wrong action`102`Authentication failed`103`Invalid phone number`104`Phone coverage not active`105`Insufficient balance`106`Invalid Sender ID`107`Invalid SMS Type`108`SMS Gateway not active`109`Invalid Schedule Time`110`Media url required`111`SMS contain spam word. Wait for approval

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 50% 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/39005245?v=4)[maazwebz](/maintainers/maazwebz)[@maazwebz](https://github.com/maazwebz)

---

Top Contributors

[![akasham67](https://avatars.githubusercontent.com/u/4095794?v=4)](https://github.com/akasham67 "akasham67 (1 commits)")[![maazwebz](https://avatars.githubusercontent.com/u/39005245?v=4)](https://github.com/maazwebz "maazwebz (1 commits)")

### Embed Badge

![Health badge](/badges/maazwebz-maazsms/health.svg)

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

###  Alternatives

[php-http/cache-plugin

PSR-6 Cache plugin for HTTPlug

25025.5M80](/packages/php-http-cache-plugin)[illuminate/http

The Illuminate Http package.

11937.2M6.6k](/packages/illuminate-http)[rdkafka/rdkafka

A PHP extension for Kafka

2.2k20.0k1](/packages/rdkafka-rdkafka)[httpsoft/http-message

Strict and fast implementation of PSR-7 and PSR-17

87930.4k113](/packages/httpsoft-http-message)[mezzio/mezzio-router

Router subcomponent for Mezzio

265.3M84](/packages/mezzio-mezzio-router)[serpapi/google-search-results-php

Get Google, Bing, Baidu, Ebay, Yahoo, Yandex, Home depot, Naver, Apple, Duckduckgo, Youtube search results via SerpApi.com

69122.6k](/packages/serpapi-google-search-results-php)

PHPackages © 2026

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