PHPackages                             digitalcz/gosms - 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. digitalcz/gosms

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

digitalcz/gosms
===============

Go SMS PHP library - provides communication with https://www.gosms.cz/api/ in PHP via PSR-18 HTTP Client

V2.0.2(1y ago)434.0k↓43.5%2[1 PRs](https://github.com/digitalcz/gosms/pulls)MITPHPPHP ^8.0CI passing

Since Jun 10Pushed 1y ago3 watchersCompare

[ Source](https://github.com/digitalcz/gosms)[ Packagist](https://packagist.org/packages/digitalcz/gosms)[ Docs](https://github.com/digitalcz/gosms)[ RSS](/packages/digitalcz-gosms/feed)WikiDiscussions 2.x Synced 1mo ago

READMEChangelog (10)Dependencies (18)Versions (21)Used By (0)

gosms
=====

[](#gosms)

[![Latest Version on Packagist](https://camo.githubusercontent.com/c268e7cd808c234d4e753ac3f262a2446d8d5774f37123ebfc69ae1c338b6314/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6469676974616c637a2f676f736d732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/digitalcz/gosms)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)![CI](https://github.com/digitalcz/gosms/workflows/CI/badge.svg)[![codecov](https://camo.githubusercontent.com/eb3a4e2938a7023a1a4ddefeb44bba28c061c4d8003afd2bb50f9ba7f3b46f55/68747470733a2f2f636f6465636f762e696f2f67682f6469676974616c637a2f676f736d732f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/digitalcz/gosms)[![Total Downloads](https://camo.githubusercontent.com/9065f1ebd6c6370ade525df1a5361d60aaf539434f57017676c53f3cddec7074/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6469676974616c637a2f676f736d732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/digitalcz/gosms)

[GoSms](https://github.com/digitalcz/gosms) PHP library - provides communication with  in PHP using PSR-18 HTTP Client, PSR-17 HTTP Factories and PSR-16 SimpleCache.

Install
-------

[](#install)

Via [Composer](https://getcomposer.org/)

```
$ composer require digitalcz/gosms
```

Configuration
-------------

[](#configuration)

#### Example configuration in PHP

[](#example-configuration-in-php)

```
use DigitalCz\GoSms\Auth\ApiKeyCredentials;
use DigitalCz\GoSms\GoSms;

// Via constructor options
$goSms = new GoSms([
    'client_id' => '...',
    'client_secret' => '...'
]);

// Or via methods
$goSms = new GoSms();
$goSms->setCredentials(new ApiKeyCredentials('...', '...'));
```

#### Available constructor options

[](#available-constructor-options)

- `client_id` - string; ApiKey client\_id key
- `client_secret` - string; ApiKey client\_secret key
- `credentials` - DigitalCz\\GoSms\\Auth\\Credentials instance
- `client` - DigitalCz\\GoSms\\GoSmsClient instance with your custom PSR17/18 objects
- `http_client` - Psr\\Http\\Client\\ClientInterface instance of your custom PSR18 client
- `cache` - Psr\\SimpleCache\\CacheInterface for caching Credentials Tokens
- `api_base` - string; override the base API url

#### Available configuration methods

[](#available-configuration-methods)

```
use DigitalCz\GoSms\Auth\Token;
use DigitalCz\GoSms\Auth\TokenCredentials;
use DigitalCz\GoSms\GoSms;
use DigitalCz\GoSms\GoSmsClient;
use Symfony\Component\Cache\Adapter\FilesystemAdapter;
use Symfony\Component\Cache\Psr16Cache;
use Symfony\Component\HttpClient\Psr18Client;

$goSms = new GoSms();
// To set your own PSR-18 HTTP Client, if not provided Psr18ClientDiscovery is used
$goSms->setClient(new GoSmsClient(new Psr18Client()));
// If you already have the auth-token, i can use TokenCredentials
$goSms->setCredentials(new TokenCredentials(new Token('...', 123)));
// Cache will be used to store auth-token, so it can be reused in later requests
$goSms->setCache(new Psr16Cache(new FilesystemAdapter()));
// Overwrite API base
$goSms->setApiBase('https://example.com/api');
```

#### Example configuration in Symfony

[](#example-configuration-in-symfony)

```
services:
  DigitalCz\GoSms\GoSms:
    $options:
      # minimal config
      client_id: '%gosms.client_id%'
      client_secret: '%gosms.client_secret%'

      # other options
      cache: '@psr16.cache'
      http_client: '@psr18.http_client'
```

Usage
-----

[](#usage)

#### Create and send Message

[](#create-and-send-message)

```
$goSms = new DigitalCz\GoSms\GoSms(['client_id' => '...', 'client_secret' => '...']);

$organization = $goSms->organization()->detail();

echo "Detail organization " . var_dump($organization) . PHP_EOL;

$messages = $goSms->messages();

$message = $messages->create(
    [
        'message' => 'Hello Hans, please call me back.',
        'recipients' => '+420775300500',
        'channel' => 6,
    ],
);
echo "Created Message " . $message->link() . PHP_EOL;

$message = $messages->get('example_message_id');
echo "Detail Message " . var_dump($message) . PHP_EOL;

$messages->delete('example_message_id');
echo "Message was deleted " . PHP_EOL;
```

Change log
----------

[](#change-log)

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

Testing
-------

[](#testing)

```
$ composer csfix    # fix codestyle
$ composer checks   # run all checks

# or separately
$ composer tests    # run phpunit
$ composer phpstan  # run phpstan
$ composer cs       # run codesniffer
```

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

[](#contributing)

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

Security
--------

[](#security)

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

Credits
-------

[](#credits)

- [Digital Solutions s.r.o.](https://github.com/digitalcz)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance37

Infrequent updates — may be unmaintained

Popularity33

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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

Recently: every ~33 days

Total

20

Last Release

598d ago

Major Versions

v0.2.3 → v1.0.02020-07-29

1.3.x-dev → v2.0.02024-05-17

PHP version history (3 changes)v0.1.0PHP ~7.2

v1.1.0PHP ^7.2 || ^8.0

v1.3.0PHP ^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/4673494?v=4)[Filip Klouček](/maintainers/fidovo)[@fidovo](https://github.com/fidovo)

![](https://avatars.githubusercontent.com/u/19805238?v=4)[DigitalCz](/maintainers/digitalcz)[@digitalcz](https://github.com/digitalcz)

---

Top Contributors

[![spajxo](https://avatars.githubusercontent.com/u/12384486?v=4)](https://github.com/spajxo "spajxo (20 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (15 commits)")[![fidovo](https://avatars.githubusercontent.com/u/4673494?v=4)](https://github.com/fidovo "fidovo (12 commits)")[![gwini](https://avatars.githubusercontent.com/u/29913695?v=4)](https://github.com/gwini "gwini (1 commits)")[![hans77cz](https://avatars.githubusercontent.com/u/15885709?v=4)](https://github.com/hans77cz "hans77cz (1 commits)")[![robskr](https://avatars.githubusercontent.com/u/5492239?v=4)](https://github.com/robskr "robskr (1 commits)")

---

Tags

gosmsphpgosmsdigitalczgo-smswww.gosms.eu

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/digitalcz-gosms/health.svg)

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

###  Alternatives

[openai-php/client

OpenAI PHP is a supercharged PHP API client that allows you to interact with the Open AI API

5.8k22.6M232](/packages/openai-php-client)[theodo-group/llphant

LLPhant is a library to help you build Generative AI applications.

1.5k311.5k5](/packages/theodo-group-llphant)[laudis/neo4j-php-client

Neo4j-PHP-Client is the most advanced PHP Client for Neo4j

184616.9k31](/packages/laudis-neo4j-php-client)[mozex/anthropic-php

Anthropic PHP is a supercharged community-maintained PHP API client that allows you to interact with Anthropic API.

46365.1k13](/packages/mozex-anthropic-php)[getbrevo/brevo-php

Official Brevo provided RESTFul API V3 php library

963.1M35](/packages/getbrevo-brevo-php)[flow-php/flow

PHP ETL - Extract Transform Load - Data processing framework

81733.7k](/packages/flow-php-flow)

PHPackages © 2026

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