PHPackages                             brainyservices/karobar-sms-api - 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. brainyservices/karobar-sms-api

ActiveLibrary[API Development](/categories/api)

brainyservices/karobar-sms-api
==============================

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

06PHP

Since Aug 15Pushed 7y agoCompare

[ Source](https://github.com/brainyservices/Karobar-sms-api)[ Packagist](https://packagist.org/packages/brainyservices/karobar-sms-api)[ RSS](/packages/brainyservices-karobar-sms-api/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Karobar SMS API
===============

[](#karobar-sms-api)

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

### Prerequisites

[](#prerequisites)

To run Karobar SMS API you have to install Karobar SMS Application on your server OR get KarobarSMS Reseller Account. For more details please visit: [Karobar SMS](https://www.karobarsms.com/)

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

```

### Installing

[](#installing)

Via Composer

```
composer require brainyservices/karobar-sms-api

```

And Via Bash

```
git clone https://github.com/brainyservices/karobar-sms-api.git

```

Usage
-----

[](#usage)

### Step 1:

[](#step-1)

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

```
require_once 'src/Class_Karobar_SMS_API.php';
use KarobarSMS\KarobarSMSAPI;

```

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

```
require 'vendor/autoload.php';
use KarobarSMS\KarobarSMSAPI;

```

### Step 2:

[](#step-2)

set your API\_KEY from `https://my.karobarsms.com/api.php` (your application install url)

```
$api_key = 'YWRtaW46YWRtaW4ucGFzc3dvcmQ=';

```

### Step 2.1:

[](#step-21)

set your Username

```
$username = 'user_name_here';

```

### Step 3:

[](#step-3)

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

```
$from = '923001234567';

```

### Step 4:

[](#step-4)

the number we are sending to - Any phone number

```
$destination = '923001234568';

```

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://ultimatesms.coderpixel.com/demo/``sms/api` is mandatory on your install url

```
$url = 'https://my.karobarsms.com/api';

```

// SMS Body

```
$sms = 'test message from Karobar SMS';

```

// 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(
    'uname' => $username,
    'api_key' => $api_key,
    'to' => $destination,
    'mask' => $from,
    'text' => $sms
);

```

// Create Unicode SMS Body for request

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

```

// Create Voice SMS Body for request

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

```

// Create MMS SMS Body for request

```
$sms_body = array(
    'uname' => $username,
    'api_key' => $api_key,
    'to' => $destination,
    'mask' => $from,
    'text' => $sms
    'mms' => $mms,
    'media_url' => $media_url,
);

```

// Create Schedule SMS Body for request

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

```

### Step 6:

[](#step-6)

Instantiate a new Karobar SMS API request

```
$client = new KarobarSMSAPI();

```

Send SMS
--------

[](#send-sms)

Finally send your sms through Karobar SMS API

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

```

Get Inbox
---------

[](#get-inbox)

Get your all message

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

```

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

[](#get-balance)

Get your account balance

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

```

Response
--------

[](#response)

Karobar SMS 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`112`Missing Required Parameters`999`Feature Not Available yetAuthors
-------

[](#authors)

- **Brainy Services** - *Initial work* - [brainyservices](https://github.com/brainyservices)

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 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.

### Community

Maintainers

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

---

Top Contributors

[![brainyservices](https://avatars.githubusercontent.com/u/42418158?v=4)](https://github.com/brainyservices "brainyservices (9 commits)")

### Embed Badge

![Health badge](/badges/brainyservices-karobar-sms-api/health.svg)

```
[![Health](https://phpackages.com/badges/brainyservices-karobar-sms-api/health.svg)](https://phpackages.com/packages/brainyservices-karobar-sms-api)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M475](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M270](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M453](/packages/google-gax)

PHPackages © 2026

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