PHPackages                             serwersms/serwersms-php-client - 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. serwersms/serwersms-php-client

ActiveLibrary[API Development](/categories/api)

serwersms/serwersms-php-client
==============================

SerwerSMS API PHP

2.0.1(2y ago)9336.9k—8.8%5[1 issues](https://github.com/SerwerSMSpl/serwersms-php-api-v2/issues)2Apache-2.0PHPPHP &gt;=5.3.0CI failing

Since Jan 9Pushed 3mo ago3 watchersCompare

[ Source](https://github.com/SerwerSMSpl/serwersms-php-api-v2)[ Packagist](https://packagist.org/packages/serwersms/serwersms-php-client)[ Docs](https://serwersms.pl)[ RSS](/packages/serwersms-serwersms-php-client/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (7)Dependencies (2)Versions (9)Used By (2)

SerwerSMS.pl PHP Client API v2
==============================

[](#serwersmspl-php-client-api-v2)

Klient PHP do komunikacji zdalnej z API v2 SerwerSMS.pl

W celu autoryzacji za pośrednictwem Tokenu API, należy wygenerować go po stronie Panelu Klienta w menu Ustawienia interfejsów → HTTP API → Tokeny API. Format nagłówka autoryzacyjnego jest zgodna z formatem Bearer token

#### Wysyłka SMS

[](#wysyłka-sms)

```
require_once('vendor/autoload.php');

try{
  $serwersms = new SerwerSMS\SerwerSMS($token);

  // SMS FULL
  $result = $serwersms->messages->sendSms(
            array(
                    '+48500600700',
                    '+48600700800'
            ),
            'Test FULL message',
            'INFORMACJA',
            array(
                    'test' => true,
                    'details' => true
            )
  );

  // SMS ECO
  $result = $serwersms->messages->sendSms(
            array(
                    '+48500600700',
                    '+48600700800'
            ),
            'Test ECO message',
            null,
            array(
                    'test' => true,
                    'details' => true
            )
  );

  // VOICE from text
  $result = $serwersms->messages->sendVoice(
            array(
                    '+48500600700',
                    '+48600700800'
            ),
            array(
                    'text' => 'Test message',
                    'test' => true,
                    'details' => true
            )
  );

  // MMS
  $list = $serwersms->files->index('mms');
  $result = $serwersms->messages->sendMms(
            array(
                    '+48500600700',
                    '+48600700800'
            ),
            'MMS Title',
            array(
                    'test' => true,
                    'file_id' => $list->items[0]->id,
                    'details' => true
            )
  );

  echo 'Skolejkowano: '.$result->queued.'';
  echo 'Niewysłano: '.$result->unsent.'';

  foreach($result->items as $sms){
    echo 'ID: '.$sms->id.'';
    echo 'NUMER: '.$sms->phone.'';
    echo 'STATUS: '.$sms->status.'';
    echo 'CZĘŚCI: '.$sms->parts.'';
    echo 'WIADOMOŚĆ: '.$sms->text.'';
  }

} catch(Exception $e){
  echo 'ERROR: '.$e->getMessage();
}
```

#### Wysyłka spersonalizowanych SMS

[](#wysyłka-spersonalizowanych-sms)

```
require_once('vendor/autoload.php');

try{
  $serwersms = new SerwerSMS\SerwerSMS($token);

  $messages[] = array(
      'phone' => '500600700',
      'text' => 'First message'
  );
  $messages[] = array(
      'phone' => '600700800',
      'text' => 'Second message'
  );

  $result = $serwersms->messages->sendPersonalized(
            $messages,
            'INFORMACJA',
            array(
                    'test' => true,
                    'details' => true
            )
  );

  echo 'Skolejkowano: '.$result->queued.'';
  echo 'Niewysłano: '.$result->unsent.'';

  foreach($result->items as $sms){
    echo 'ID: '.$sms->id.'';
    echo 'NUMER: '.$sms->phone.'';
    echo 'STATUS: '.$sms->status.'';
    echo 'CZĘŚCI: '.$sms->parts.'';
    echo 'WIADOMOŚĆ: '.$sms->text.'';
  }

} catch(Exception $e){
  echo 'ERROR: '.$e->getMessage();
}
```

#### Pobieranie raportów doręczeń

[](#pobieranie-raportów-doręczeń)

```
require_once('vendor/autoload.php');

try{
  $serwersms = new SerwerSMS\SerwerSMS($token);

  // Get messages reports
  $result = $serwersms->messages->reports(array('id' => array('aca3944055')));

  foreach($result->items as $sms){
    echo 'ID: '.$sms->id.'';
    echo 'NUMER: '.$sms->phone.'';
    echo 'STATUS: '.$sms->status.'';
    echo 'SKOLEJKOWANO: '.$sms->queued.'';
    echo 'WYSŁANO: '.$sms->sent.'';
    echo 'DORĘCZONO: '.$sms->delivered.'';
    echo 'NADAWCA: '.$sms->sender.'';
    echo 'TYP: '.$sms->type.'';
    echo 'WIADOMOŚĆ: '.$sms->text.'';
  }

} catch(Exception $e){
  echo 'ERROR: '.$e->getMessage();
}
```

#### Pobieranie wiadomości przychodzących

[](#pobieranie-wiadomości-przychodzących)

```
require_once('vendor/autoload.php');

try{
  $serwersms = new SerwerSMS\SerwerSMS($token);

  // Get recived messages
  $result = $serwersms->messages->recived('ndi');

  foreach($result->items as $sms){
    echo 'ID: '.$sms->id.'';
    echo 'TYP: '.$sms->type.'';
    echo 'NUMER: '.$sms->phone.'';
    echo 'DATA: '.$sms->recived.'';
    echo 'CZARNA LISTA: '.$sms->blacklist.'';
    echo 'WIADOMOŚĆ: '.$sms->text.'';
  }

} catch(Exception $e){
  echo 'ERROR: '.$e->getMessage();
}
```

Wymagania
---------

[](#wymagania)

php &gt;= 5.3.0

lib-curl &gt;= 7.1

Dokumentacja
------------

[](#dokumentacja)

Konsola api:

Instalacja
----------

[](#instalacja)

Instalacja przez Composera ():

```
composer require serwersms/serwersms-php-client

```

###  Health Score

47

—

FairBetter than 94% of packages

Maintenance51

Moderate activity, may be stable

Popularity42

Moderate usage in the ecosystem

Community17

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 53.8% 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 ~465 days

Recently: every ~196 days

Total

8

Last Release

886d ago

Major Versions

1.0.7 → 2.0.02022-10-13

### Community

Maintainers

![](https://www.gravatar.com/avatar/635e49d7360c710e89db0936e781e747f34342609d7d29a05eb060a78bb556bb?d=identicon)[SerwerSMSpl](/maintainers/SerwerSMSpl)

---

Top Contributors

[![SerwerSMSpl](https://avatars.githubusercontent.com/u/7964146?v=4)](https://github.com/SerwerSMSpl "SerwerSMSpl (28 commits)")[![jareksapota](https://avatars.githubusercontent.com/u/10436516?v=4)](https://github.com/jareksapota "jareksapota (24 commits)")

---

Tags

phpapismsserwersms

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/serwersms-serwersms-php-client/health.svg)

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

###  Alternatives

[unicodeveloper/jusibe-php-lib

Jusibe PHP Library

3417.4k1](/packages/unicodeveloper-jusibe-php-lib)[lakshmaji/plivo

Send SMS using Plivo Cloud API

2016.8k](/packages/lakshmaji-plivo)[lakshmajim/plivo

Send SMS using Plivo Cloud API

205.7k](/packages/lakshmajim-plivo)[okolaa/termiiphp

Termii Rest API php library

112.4k](/packages/okolaa-termiiphp)

PHPackages © 2026

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