PHPackages                             mocean/client7 - 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. mocean/client7

ActiveLibrary[API Development](/categories/api)

mocean/client7
==============

PHP Client for using Mocean's API.

2.1.2(4y ago)11.8k↓50%1[2 PRs](https://github.com/MoceanAPI/mocean-sdk-php7/pulls)1MITPHPPHP ^7.3 | ^8.0

Since Mar 2Pushed 3y ago2 watchersCompare

[ Source](https://github.com/MoceanAPI/mocean-sdk-php7)[ Packagist](https://packagist.org/packages/mocean/client7)[ RSS](/packages/mocean-client7/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (4)Versions (4)Used By (1)

MoceanAPI Client Library for PHP
================================

[](#moceanapi-client-library-for-php)

[![Latest Stable Version](https://camo.githubusercontent.com/2da3b231f0ed1a3ff46a68cf8402afd40473809bb8e4a99dbf473b50dff76e73/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d6f6365616e2f636c69656e742e737667)](https://packagist.org/packages/mocean/client7)[![build](https://github.com/MoceanAPI/mocean-sdk-php7/actions/workflows/build.yml/badge.svg)](https://github.com/MoceanAPI/mocean-sdk-php7/actions/workflows/build.yml)[![codecov](https://camo.githubusercontent.com/53fc3660fea14559c49dd71f2bd04e527ccaa3e5d95e5d26fedfd0dd1bbb8a27/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f4d6f6365616e4150492f6d6f6365616e2d73646b2d7068702e737667)](https://codecov.io/gh/MoceanAPI/mocean-sdk-php)[![codacy](https://camo.githubusercontent.com/f689560f56cfe3331a9757c9163a2a400f7ad3fc059f78cd91db5a101a20cf27/68747470733a2f2f696d672e736869656c64732e696f2f636f646163792f67726164652f37613165393466316331656134306664626661333632656362626334623266332e737667)](https://app.codacy.com/project/MoceanAPI/mocean-sdk-php/dashboard)[![StyleCI](https://camo.githubusercontent.com/461bb467da7389ce2b52c8efcc31feff567db4995264a4bfd04bbee638aa2004/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3133383732343932312f736869656c643f6272616e63683d6d6173746572)](https://github.styleci.io/repos/138724921)[![License](https://camo.githubusercontent.com/135e7cd7f287d8807f2deb9bd648e1d10f593eb36e58887547d267fba3f8747f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6d6f6365616e2f636c69656e742e737667)](https://packagist.org/packages/mocean/client)[![Total Downloads](https://camo.githubusercontent.com/a7159ed62828797452d911debd40817f86d9d2f88c4693e44f6c27205b4f7083/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d6f6365616e2f636c69656e742e737667)](https://packagist.org/packages/mocean/client)

*This library requires a minimum PHP version of 5.5*

This is the PHP client library for use Mocean's API. To use this, you'll need a Mocean account. Sign up [for free at moceanapi.com](https://dashboard.moceanapi.com/register?medium=github&campaign=sdk-php).

- [Installation](#installation)
- [Usage](#usage)
- [Example](#example)

Installation
------------

[](#installation)

To use the client library you'll need to have [created a Mocean account](https://dashboard.moceanapi.com/register?medium=github&campaign=sdk-php).

To install the PHP client library using Composer.

```
composer require mocean/client7
```

Usage
-----

[](#usage)

If you're using composer, make sure the autoloader is included in your project's bootstrap file:

```
require_once "vendor/autoload.php";
```

Create a client with your API key and secret:

```
use Mocean\Client;
use Mocean\Client\Credentials\Basic;

$mocean = new Client(new Basic('API_KEY_HERE','API_SECRET_HERE'));
```

Example
-------

[](#example)

To use [Mocean's SMS API](https://moceanapi.com/docs/?php#send-sms) to send an SMS message, call the `$mocean->message()->send();` method.

The API can be called directly, using a simple array of parameters, the keys match the [parameters of the API](https://moceanapi.com/docs/?php#send-sms).

```
$res = $mocean->message()->send([
    'mocean-to' => '60123456789',
    'mocean-from' => 'MOCEAN',
    'mocean-text' => 'Hello World'
]);

echo $res;
```

### Responses

[](#responses)

For your convenient, the API response data can be accessed either using php `object` style or `array` style

```
echo $res;            //show full response string
echo $res['status'];  //show response status, '0' in this case
echo $res->status;    //same as above
```

Documentation
-------------

[](#documentation)

Kindly visit [MoceanApi Docs](https://moceanapi.com/docs/?php) for more usage

License
-------

[](#license)

This library is released under the [MIT License](LICENSE)

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 65.3% 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 ~154 days

Total

2

Last Release

1749d ago

PHP version history (2 changes)2.1.1PHP ^7.2 | ^8.0

2.1.2PHP ^7.3 | ^8.0

### Community

Maintainers

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

---

Top Contributors

[![lkloon123](https://avatars.githubusercontent.com/u/21114981?v=4)](https://github.com/lkloon123 "lkloon123 (66 commits)")[![d3no](https://avatars.githubusercontent.com/u/19152825?v=4)](https://github.com/d3no "d3no (31 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (3 commits)")[![zed-mocean](https://avatars.githubusercontent.com/u/70882784?v=4)](https://github.com/zed-mocean "zed-mocean (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mocean-client7/health.svg)

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

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[codedredd/laravel-soap

A SoapClient wrapper integration for Laravel

221516.6k3](/packages/codedredd-laravel-soap)[visualappeal/matomo-php-api

API wrapper for matomo

95230.3k](/packages/visualappeal-matomo-php-api)[craftpulse/craft-typesense

Craft Plugin that synchronises with Typesense

122.7k](/packages/craftpulse-craft-typesense)

PHPackages © 2026

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