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

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

txtghana/txtconnect-sms-api
===========================

TXTConnect SMS API is built by Mike-berg Afu - Bulk SMS Application

00PHP

Since Mar 20Pushed 6y ago1 watchersCompare

[ Source](https://github.com/mikebergafu/txtconnect-sms-lib)[ Packagist](https://packagist.org/packages/txtghana/txtconnect-sms-api)[ RSS](/packages/txtghana-txtconnect-sms-api/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

[![Latest Stable Version](https://camo.githubusercontent.com/3248734826356caf77fa60482abc69c91d6d8a59c521a5af537c950a8d72c5e6/68747470733a2f2f706f7365722e707567782e6f72672f7368616d696d2f756c74696d6174652d736d732d6170692f762f737461626c65)](https://packagist.org/packages/shamim/ultimate-sms-api?format=flat-square)[![License](https://camo.githubusercontent.com/eacab8b37a7aa19327b1e0aa0ba537d64566b60fd9b9bb882ad5ae72fe22d226/68747470733a2f2f706f7365722e707567782e6f72672f7368616d696d2f756c74696d6174652d736d732d6170692f6c6963656e7365)](https://packagist.org/packages/shamim/ultimate-sms-api?format=flat-square)[![GitHub issues](https://camo.githubusercontent.com/73214ba990ac0ee9f0757ab97e9b59bb70319a7df12c22e92277cabcbdcc69e5/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f616b617368616d36372f756c74696d6174652d736d732d6170692e7376673f7374796c653d666c61742d737175617265)](https://github.com/akasham67/ultimate-sms-api/issues)[![GitHub stars](https://camo.githubusercontent.com/bb63f840aff07511d5a59966598bff5af8eff3eda087f28a19dcb3e44577453c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f616b617368616d36372f756c74696d6174652d736d732d6170692e7376673f7374796c653d666c61742d737175617265)](https://github.com/akasham67/ultimate-sms-api/stargazers)

TXTGhana SMS API
================

[](#txtghana-sms-api)

TXTGhana SMS API is build for TXTConnect SMS - Bulk SMS Application For Marketing

### Prerequisites

[](#prerequisites)

To run TxtGhana SMS API you have to install TxtConnect SMS Application on your server. For more details please visit: [TXTConnect SMS](https://txtconnect.co/)

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

```

### Installing

[](#installing)

Via Composer

```
composer require txtghana/txtconnect-sms-api

```

And Via Bash

```
git clone https://github.com/akasham67/ultimate-sms-api.git

```

Usage
-----

[](#usage)

### Step 1:

[](#step-1)

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

```
require_once 'src/Class_Ultimate_SMS_API.php';
use UltimateSMS\UltimateSMSAPI;
```

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

```
require 'vendor/autoload.php';
use UltimateSMS\UltimateSMSAPI;
```

### 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';
```

For multiple number please use Comma (,) after every single number.

```
$destination = '8801810000000,8801721000000,880167000000,01913000000';
```

You can insert maximum 100 numbers using comma in single api request.

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://ultimatesms.coderpixel.com/demo/sms/api';
```

// SMS Body

```
$sms = 'test message from Ultimate 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(
    '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 Ultimate SMS API request

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

Send SMS
--------

[](#send-sms)

Finally send your sms through Ultimate SMS 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)

Ultimate 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 approvalAuthors
-------

[](#authors)

- **Abul Kashem Shamim** - *Initial work* - [akasham67](https://github.com/akasham67)

###  Health Score

16

—

LowBetter than 5% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 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/f8391168059cabb3237c3833965269f430c8d68fe0465b932375cc14c64c90a4?d=identicon)[mikebergafu](/maintainers/mikebergafu)

---

Top Contributors

[![mikebergafu](https://avatars.githubusercontent.com/u/18086953?v=4)](https://github.com/mikebergafu "mikebergafu (1 commits)")

### Embed Badge

![Health badge](/badges/txtghana-txtconnect-sms-api/health.svg)

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

###  Alternatives

[friendsofsymfony/rest-bundle

This Bundle provides various tools to rapidly develop RESTful API's with Symfony

2.8k73.3M319](/packages/friendsofsymfony-rest-bundle)[php-http/discovery

Finds and installs PSR-7, PSR-17, PSR-18 and HTTPlug implementations

1.3k309.5M1.2k](/packages/php-http-discovery)[nyholm/psr7

A fast PHP7 implementation of PSR-7

1.3k235.4M2.4k](/packages/nyholm-psr7)[pusher/pusher-php-server

Library for interacting with the Pusher REST API

1.5k94.8M293](/packages/pusher-pusher-php-server)[spatie/crawler

Crawl all internal links found on a website

2.8k16.3M52](/packages/spatie-crawler)[react/http

Event-driven, streaming HTTP client and server implementation for ReactPHP

78126.4M414](/packages/react-http)

PHPackages © 2026

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