PHPackages                             bahricanli/corvass-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. [API Development](/categories/api)
4. /
5. bahricanli/corvass-php

ActiveLibrary[API Development](/categories/api)

bahricanli/corvass-php
======================

A PHP client library for Corvass API

1.1.0(3y ago)03511MITPHPPHP &gt;=5.6.4

Since Apr 21Pushed 3y agoCompare

[ Source](https://github.com/bahricanli/corvass-php)[ Packagist](https://packagist.org/packages/bahricanli/corvass-php)[ Docs](https://github.com/bahricanli/corvass)[ RSS](/packages/bahricanli-corvass-php/feed)WikiDiscussions master Synced 4w ago

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

PHP Corvass Client
==================

[](#php-corvass-client)

[![Latest Version on Packagist](https://camo.githubusercontent.com/fdc3bfb5e981474dae1adb1b5f363f05df410e1f3ee0b0d8a8827fbabd5cac0d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f626168726963616e6c692f636f72766173732d7068702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/bahricanli/corvass-php)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/7a2064993eb34cd04176be0fe66c5d3849418cabf82f92d39bbb3b6a0ab8d167/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f626168726963616e6c692f636f72766173732d7068702f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/bahricanli/corvass-php)[![StyleCI](https://camo.githubusercontent.com/dfeec47c1fd97e8f5eae4e21ffe82d14b28ef70b7d18112655a55f5657550419/68747470733a2f2f7374796c6563692e696f2f7265706f732f3132313830323130302f736869656c643f6272616e63683d6d6173746572)](https://styleci.io/repos/121802100)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/0084b3282d8244ab67e94138d1bd53e0a52811ede41ccac739cb2e20f2b72fb7/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f626168726963616e6c692f636f72766173732d7068702f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/bahricanli/corvass-php/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/f27319238d85bc44f27651c6c5b03bfda8897dc9e1096647ce792fc2815be512/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f626168726963616e6c692f636f72766173732d7068702f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/bahricanli/corvass-php/?branch=master)[![Total Downloads](https://camo.githubusercontent.com/80f3922df06c6945e3c37f288c7da72cdd446a2de86a0c5abefa14ff7b6c3829/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f626168726963616e6c692f636f72766173732d7068702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/bahricanli/corvass-php)

This package provides an easy to use Corvass service which can be used with both XML and Http apis.

Bu paket, hem XML hem Http API ile çalışan kullanımı kolay bir Corvass servisi sağlar.

Dokümanın türkçe hali için: [BENIOKU](BENIOKU.md)

Contents
--------

[](#contents)

- [Installation](#installation)
    - [Setting up the Corvass service](#setting-up-the-corvass-service)
- [Usage](#usage)
    - [Available methods](#available-methods)
- [Changelog](#changelog)
- [Testing](#testing)
- [Security](#security)
- [Contributing](#contributing)
- [Credits](#credits)
- [License](#license)

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

[](#installation)

You can install this package via composer:

```
composer require bahricanli/corvass-php
```

### Setting up the Corvass service

[](#setting-up-the-corvass-service)

You will need to register to Corvass to use this channel.

Usage
-----

[](#usage)

First, boot the CorvassService with your desired client implementation.

- **CorvassXmlClient**
- **CorvassHttpClient** (This is actually a Rest-Like client but the vendor names their API that way.)

```
require __DIR__ . '/../vendor/autoload.php';

use BahriCanli\Corvass\CorvassService;
use BahriCanli\Corvass\CorvassService;
use BahriCanli\Corvass\ShortMessageFactory;
use BahriCanli\Corvass\Http\Clients\CorvassXmlClient;
use BahriCanli\Corvass\Http\Clients\CorvassHttpClient;
use BahriCanli\Corvass\ShortMessageCollectionFactory;

$service = new CorvassService(new CorvassXmlClient(
    'sms.corvass.net/xml',
    'username',
    'password',
    'outboxname'
), new ShortMessageFactory(), new ShortMessageCollectionFactory());

// ya da

$service = new CorvassService(new CorvassHttpClient(
    new GuzzleHttp\Client(),
    'https://sms.corvass.net/http',
    'username',
    'password',
    'outboxname'
), new ShortMessageFactory(), new ShortMessageCollectionFactory());
```

### Available methods

[](#available-methods)

After successfully booting your CorvassService instance up; use one of the following methods to send SMS message(s).

#### One Message - Single or Multiple Recipients:

[](#one-message---single-or-multiple-recipients)

```
$response = $service->sendShortMessage(['5530000000', '5420000000'], 'This is a test message.');

if($response->isSuccessful()) {
    // storeGroupIdForLaterReference is not included in the package.
    storeGroupIdForLaterReference($response->groupId());
} else {
    var_dump($response->message());
    var_dump($response->statusCode());
    var_dump($response->status());
}
```

#### Multiple Messages - Multiple Recipients:

[](#multiple-messages---multiple-recipients)

Please not that if you have using that method, every message should only have one receiver. *(This is also an API limitation which I didn't hack.)*

```
$response2 = $service->sendShortMessages([[
    'recipient' => '5530000000',
    'message' => 'This is a test.',
], [
    'recipient' => '5420000000',
    'message' => 'This is another test.',
]]);

if($response2->isSuccessful()) {
    // storeGroupIdForLaterReference is not included in the package.
    storeGroupIdForLaterReference($response2->groupId());
} else {
    var_dump($response2->message());
    var_dump($response2->statusCode());
    var_dump($response2->status());
}
```

### Cross Reference

[](#cross-reference)

`$response->groupId()` will throw BadMethodCallException if the client is `CorvassHttpClient`. `$response->messageReportIdentifiers()` will throw BadMethodCallException if the client is `CorvassXmlClient`.

change client implementation with caution.

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Credits
-------

[](#credits)

- [Bahri Meriç Canlı](https://github.com/bahricanli)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 92% 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 ~95 days

Total

2

Last Release

1383d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4894f69d95bdf9814c8c0db5876852c4381ccaba0a2d98a224ea1269123217f8?d=identicon)[bmericc](/maintainers/bmericc)

---

Top Contributors

[![bmericc](https://avatars.githubusercontent.com/u/16552?v=4)](https://github.com/bmericc "bmericc (23 commits)")[![erdemkeren](https://avatars.githubusercontent.com/u/1636960?v=4)](https://github.com/erdemkeren "erdemkeren (2 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/bahricanli-corvass-php/health.svg)

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

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)[mapado/rest-client-sdk

Rest Client SDK for hydra API

1125.9k2](/packages/mapado-rest-client-sdk)

PHPackages © 2026

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