PHPackages                             odenktools/wavecell-php - 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. odenktools/wavecell-php

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

odenktools/wavecell-php
=======================

Rest PHP Library For Wavecell SMS

1.0.1(7y ago)228[2 PRs](https://github.com/odenktools/wavecell-php/pulls)MITPHP &gt;=5.4

Since May 9Compare

[ Source](https://github.com/odenktools/wavecell-php)[ Packagist](https://packagist.org/packages/odenktools/wavecell-php)[ Docs](https://github.com/odenktools/wavecell-php)[ RSS](/packages/odenktools-wavecell-php/feed)WikiDiscussions Synced 4d ago

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

Wavecell SMS PHP API Library
============================

[](#wavecell-sms-php-api-library)

[![Build Status](https://camo.githubusercontent.com/6ddf267fe77b85a7362816c01f0d48b451bbaeb3ac0ef0441878adce4e4702e1/68747470733a2f2f7472617669732d63692e6f72672f6f64656e6b746f6f6c732f7761766563656c6c2d7068702e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/odenktools/wavecell-php)[![codecov](https://camo.githubusercontent.com/d9bc12fdfdd9609cef8997b2308502cdd0c0c4e6936a45becab52a50f0972293/68747470733a2f2f636f6465636f762e696f2f67682f6f64656e6b746f6f6c732f7761766563656c6c2d7068702f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/odenktools/wavecell-php)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/6fc06aed13b51f98687b378483fc1b6f6ddd69c892a1a7641df2530d0989e8a3/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6f64656e6b746f6f6c732f7761766563656c6c2d7068702f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/odenktools/wavecell-php/?branch=master)

Wavecell SMS PHP API Library was created by and is maintained by [Odenktools](https://github.com/odenktools).

For details information see [Wavecell Documentation](https://developer.wavecell.com/v1/api-documentation).

PHP Version Support
-------------------

[](#php-version-support)

- PHP 5.4.x
- PHP 5.5.x
- PHP 5.6.x
- PHP 7.0.x
- PHP 7.1.x
- PHP 7.2.x
- PHP 7.3.x

Installation
============

[](#installation)

```
composer require odenktools/wavecell-php
```

Usage
=====

[](#usage)

##### Send Single SMS

[](#send-single-sms)

Send SMS individually (1 request per SMS).

See for detail [Send SMS - Single](https://developer.wavecell.com/v1/api-documentation/send-many-sms)

**Sample (Without Throwing)**

```
\Wavecell\Config::$timeZone = 'Asia/Jakarta';
\Wavecell\Config::$country = 'ID';
\Wavecell\Config::$resendInterval = 120;
\Wavecell\Config::$otpCodeValidity = 600;
\Wavecell\Config::$otpCodeLength = 6;
\Wavecell\Config::$smsExpireInMinutes = 60;
\Wavecell\Config::$subAccountId = 'YOUR_SUB_ACCOUNT_ID';
\Wavecell\Config::$secretKey = 'YOUR_SECRET_KEY';
\Wavecell\Config::$smsFrom = 'YOUR_APP_SETTING';

$sms = new \Wavecell\Sms();
$response = $sms->sendSingleSms('+6289671000082', 'HELLO WORLD, YOU CAN READ THIS SMS?', 'AUTO', false);
$body = (string)$response->getBody();
$code = (int)$response->getStatusCode();
if ($code === 400) {
    echo "BAD REQUEST";
} else if ($code === 401) {
    echo "Unauthorized ";
} else if ($code === 404) {
    echo "Not Found";
} else if ($code === 200) {
    $content = json_decode($body);
    echo $code . '';
    echo $content->status->code . '';
    echo $content->status->description. '';
    echo $content->umid. '';
    echo $content->encoding. '';
    echo $content->destination. '';
}
```

##### Send Single SMS

[](#send-single-sms-1)

**Sample (With Throwing)**

```
try {
    \Wavecell\Config::$timeZone = 'Asia/Jakarta';
    \Wavecell\Config::$country = 'ID';
    \Wavecell\Config::$resendInterval = 120;
    \Wavecell\Config::$otpCodeValidity = 600;
    \Wavecell\Config::$otpCodeLength = 6;
    \Wavecell\Config::$smsExpireInMinutes = 60;
    \Wavecell\Config::$subAccountId = 'YOUR_SUB_ACCOUNT_ID';
    \Wavecell\Config::$secretKey = 'YOUR_SECRET_KEY';
    \Wavecell\Config::$smsFrom = 'YOUR_APP_SETTING';

    $sms = new \Wavecell\Sms();
    $response = $sms->sendSingleSms('+6289671000082', 'HELLO WORLD, YOU CAN READ THIS SMS?', 'AUTO', true);
    $body = (string)$response->getBody();
    $code = (int)$response->getStatusCode();
    echo $code . '';
    echo $content->status->code . '';
    echo $content->status->description. '';
    echo $content->umid. '';
    echo $content->encoding. '';
    echo $content->destination. '';
} catch (\Wavecell\HttpException $exception) {
    echo $exception->getMessage();
}
```

##### Send Batch SMS

[](#send-batch-sms)

Send SMS by batches (1 request for multiple SMS) with personalized contents/properties.

Using this API, it is possible to send up to **10,000 SMS per request**.

See for detail [Send SMS - Many](https://developer.wavecell.com/v1/api-documentation/send-many-sms)

**Sample (With Throwing)**

```
try {
    \Wavecell\Config::$timeZone = 'Asia/Jakarta';
    \Wavecell\Config::$country = 'ID';
    \Wavecell\Config::$resendInterval = 120;
    \Wavecell\Config::$otpCodeValidity = 600;
    \Wavecell\Config::$otpCodeLength = 6;
    \Wavecell\Config::$smsExpireInMinutes = 60;
    \Wavecell\Config::$subAccountId = 'YOUR_SUB_ACCOUNT_ID';
    \Wavecell\Config::$secretKey = 'YOUR_SECRET_KEY';
    \Wavecell\Config::$smsFrom = 'YOUR_APP_SETTING';

    $sms = new \Wavecell\Sms();
    $numbers = array('+6289680000000', '+6289680000001');
    $response = $sms->sendMultipleSms('HELLO WORLD, YOU CAN READ THIS SMS?', $numbers);
    $body = (string)$response->getBody();
    $code = (int)$response->getStatusCode();
    echo $code . '';
    echo $content->status->code . '';
    echo $content->status->description. '';
    echo $content->umid. '';
    echo $content->encoding. '';
    echo $content->destination. '';
} catch (\Wavecell\HttpException $exception) {
    echo $exception->getMessage();
}
```

**Sample (Without Throwing)**

```
\Wavecell\Config::$timeZone = 'Asia/Jakarta';
\Wavecell\Config::$country = 'ID';
\Wavecell\Config::$resendInterval = 120;
\Wavecell\Config::$otpCodeValidity = 600;
\Wavecell\Config::$otpCodeLength = 6;
\Wavecell\Config::$smsExpireInMinutes = 60;
\Wavecell\Config::$subAccountId = 'YOUR_SUB_ACCOUNT_ID';
\Wavecell\Config::$secretKey = 'YOUR_SECRET_KEY';
\Wavecell\Config::$smsFrom = 'YOUR_APP_SETTING';

$sms = new \Wavecell\Sms();
$numbers = array('+6289680000000', '+6289680000001');
$response = $sms->sendMultipleSms('HELLO WORLD, YOU CAN READ THIS SMS?', $numbers, 'AUTO', false);
$body = (string)$response->getBody();
$code = (int)$response->getStatusCode();
if ($code === 400) {
    echo "BAD REQUEST";
} else if ($code === 401) {
    echo "Unauthorized ";
} else if ($code === 404) {
    echo "Not Found";
} else if ($code === 200) {
    $content = json_decode($body);
    echo $content->status->code . '';
    echo $content->status->description. '';
    echo $content->umid. '';
    echo $content->encoding. '';
    echo $content->destination. '';
}
```

##### Send OTP SMS

[](#send-otp-sms)

See for detail [Mobile Verification - Code generation](https://developer.wavecell.com/v1/api-documentation/verify-code-generation)

**Sample (With Throwing)**

```
try {
    \Wavecell\Config::$timeZone = 'Asia/Jakarta';
    \Wavecell\Config::$country = 'ID';
    \Wavecell\Config::$resendInterval = 120;
    \Wavecell\Config::$otpCodeValidity = 600;
    \Wavecell\Config::$otpCodeLength = 6;
    \Wavecell\Config::$smsExpireInMinutes = 60;
    \Wavecell\Config::$subAccountId = 'YOUR_SUB_ACCOUNT_ID';
    \Wavecell\Config::$secretKey = 'YOUR_SECRET_KEY';
    \Wavecell\Config::$smsFrom = 'YOUR_APP_SETTING';

    $sms = new \Wavecell\Sms();
    $response = $sms->sendOtpSms('+6289680000000', true);
    $body = (string)$response->getBody();
    $code = (int)$response->getStatusCode();
    echo $content->resourceUri . '';
    echo $content->uid . '';
    echo $content->status . '';
    echo $content->attempt. '';
    echo $content->expiresAt. '';
    echo $content->nextSmsAfter. '';
} catch (\Wavecell\HttpException $exception) {
    echo $exception->getMessage();
}
```

**Sample (Without Throwing)**

```
\Wavecell\Config::$timeZone = 'Asia/Jakarta';
\Wavecell\Config::$country = 'ID';
\Wavecell\Config::$resendInterval = 120;
\Wavecell\Config::$otpCodeValidity = 600;
\Wavecell\Config::$otpCodeLength = 6;
\Wavecell\Config::$smsExpireInMinutes = 60;
\Wavecell\Config::$subAccountId = 'YOUR_SUB_ACCOUNT_ID';
\Wavecell\Config::$secretKey = 'YOUR_SECRET_KEY';
\Wavecell\Config::$smsFrom = 'YOUR_APP_SETTING';

$sms = new \Wavecell\Sms();
$numbers = array('+6289680000000', '+6289680000001');
$response = $sms->sendOtpSms('+6289680000000', false);
$body = (string)$response->getBody();
$code = (int)$response->getStatusCode();
if ($code === 400) {
    echo "BAD REQUEST";
} else if ($code === 401) {
    echo "Unauthorized ";
} else if ($code === 404) {
    echo "Not Found";
} else if ($code === 200) {
    $content = json_decode($body);
    echo $content->resourceUri . '';
    echo $content->uid . '';
    echo $content->status . '';
    echo $content->attempt. '';
    echo $content->expiresAt. '';
    echo $content->nextSmsAfter. '';
}
```

##### Verification OTP

[](#verification-otp)

See for detail [Mobile Verification - Code validation](https://developer.wavecell.com/v1/api-documentation/verify-code-validation)

**Sample (With Throwing)**

```
try {
    \Wavecell\Config::$timeZone = 'Asia/Jakarta';
    \Wavecell\Config::$country = 'ID';
    \Wavecell\Config::$resendInterval = 120;
    \Wavecell\Config::$otpCodeValidity = 600;
    \Wavecell\Config::$otpCodeLength = 6;
    \Wavecell\Config::$smsExpireInMinutes = 60;
    \Wavecell\Config::$subAccountId = 'YOUR_SUB_ACCOUNT_ID';
    \Wavecell\Config::$secretKey = 'YOUR_SECRET_KEY';
    \Wavecell\Config::$smsFrom = 'YOUR_APP_SETTING';

    $sms = new \Wavecell\Sms();
    $response = $sms->verifyOtpSms('683cc08a-bf70-e911-8145-02d9baaa9e6f', '908273');
    $body = (string)$response->getBody();
    $code = (int)$response->getStatusCode();
    echo $content->resourceUri . '';
    echo $content->uid . '';
    echo $content->msisdn . '';
    echo $content->status . '';
    echo $content->attempt. '';
    echo $content->expiresAt. '';
} catch (\Wavecell\HttpException $exception) {
    echo $exception->getMessage();
}
```

**Sample (Without Throwing)**

```
\Wavecell\Config::$timeZone = 'Asia/Jakarta';
\Wavecell\Config::$country = 'ID';
\Wavecell\Config::$resendInterval = 120;
\Wavecell\Config::$otpCodeValidity = 600;
\Wavecell\Config::$otpCodeLength = 6;
\Wavecell\Config::$smsExpireInMinutes = 60;
\Wavecell\Config::$subAccountId = 'YOUR_SUB_ACCOUNT_ID';
\Wavecell\Config::$secretKey = 'YOUR_SECRET_KEY';
\Wavecell\Config::$smsFrom = 'YOUR_APP_SETTING';

$sms = new \Wavecell\Sms();
$response = $sms->verifyOtpSms('683cc08a-bf70-e911-8145-02d9baaa9e6f', '908273', false);
$body = (string)$response->getBody();
$code = (int)$response->getStatusCode();
if ($code === 400) {
    echo "BAD REQUEST";
} else if ($code === 401) {
    echo "Unauthorized ";
} else if ($code === 404) {
    echo "Not Found";
} else if ($code === 200) {
    $content = json_decode($body);
    echo $content->resourceUri . '';
    echo $content->uid . '';
    echo $content->msisdn . '';
    echo $content->status . '';
    echo $content->attempt. '';
    echo $content->expiresAt. '';
}
```

Test
====

[](#test)

**Using Composer**

```
composer run-script test:ci
```

**Using PHPUnit**

```
vendor/bin/phpunit --verbose --coverage-text
```

LICENSE
=======

[](#license)

MIT License

Copyright (c) 2019 odenktools

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

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 ~0 days

Total

2

Last Release

2611d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8f7f2a27279f20428dae0a8385089cf61665b9c56e3cae0b5860c35043ffaf00?d=identicon)[moeloet](/maintainers/moeloet)

---

Tags

httpphpresthttp clientWavecellWavecell PHP

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/odenktools-wavecell-php/health.svg)

```
[![Health](https://phpackages.com/badges/odenktools-wavecell-php/health.svg)](https://phpackages.com/packages/odenktools-wavecell-php)
```

###  Alternatives

[xeroapi/xero-php-oauth2

Xero official PHP SDK for oAuth2 generated with OpenAPI spec 3

1054.7M18](/packages/xeroapi-xero-php-oauth2)[oat-sa/tao-core

TAO core extension

66143.7k120](/packages/oat-sa-tao-core)[sunchayn/nimbus

A Laravel package providing an in-browser API client with automatic schema generation, live validation, and built-in authentication with a touch of Laravel-tailored magic for effortless API testing.

32041.3k](/packages/sunchayn-nimbus)[bitrix24/b24phpsdk

An official PHP library for the Bitrix24 REST API

10244.2k5](/packages/bitrix24-b24phpsdk)[odenktools/php-bca

Library REST API Untuk Develop BCA Payment

8431.5k2](/packages/odenktools-php-bca)[onesignal/onesignal-php-api

A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com

34216.9k2](/packages/onesignal-onesignal-php-api)

PHPackages © 2026

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