PHPackages                             tegme/tegme - 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. tegme/tegme

ActiveLibrary[API Development](/categories/api)

tegme/tegme
===========

Lightweight telegra.ph/api client.

1.2.0(6y ago)1162AGPL-3.0-onlyPHPPHP &gt;=5.6CI failing

Since Oct 30Pushed 6y ago1 watchersCompare

[ Source](https://github.com/alexandrmazur96/tegme)[ Packagist](https://packagist.org/packages/tegme/tegme)[ Docs](https://github.com/alexandrmazur96/tegme)[ RSS](/packages/tegme-tegme/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (5)Used By (0)

Telegraph me.
=============

[](#telegraph-me)

[![Packagist](https://camo.githubusercontent.com/c043e4248407cc4217f49bd2d1432b585ab8329811e1afa751842cfe38b5e391/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7465676d652f7465676d65)](https://packagist.org/packages/tegme/tegme)[![License: GPL v3](https://camo.githubusercontent.com/48bf9b56d44f38db53ce21294cf0b9487d0a3734ab3ba1fe4c69858ae20db2c1/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d47504c76332d626c75652e737667)](https://www.gnu.org/licenses/gpl-3.0)

Tegme is pretty simple in use and lightweight client for [api.telegra.ph](https://api.telegra.ph).

Original API description you can find [here](https://telegra.ph/api).

Contents
--------

[](#contents)

- [Installation](#installation)
- [Usage](#usage)
- [Author](#author)
- [License](#license)

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

[](#installation)

`$ composer require tegme/tegme`

Requirements
------------

[](#requirements)

All extension dependencies defined in *composer.json*:

- [cURL](https://www.php.net/manual/en/book.curl.php) - we need it for making requests to telegra.ph API;
- [JSON](https://www.php.net/manual/en/book.json.php) - we need it for create requests data for querying telegra.ph API;
- [mbstring](https://www.php.net/manual/en/book.mbstring.php) - we need it for interaction with multi-byte strings;
- [PHP &gt;= 5.6](https://www.php.net) - code of this library compatible with PHP since 5.6.

Usage
-----

[](#usage)

First of all - you should create a client object:

```
use Tegme\Telegraph;

$telegraphClient = new Telegraph();
```

Then - you should create one of the request object, defined in `Tegme\Types\Requests\*`, e.g.:

```
use Tegme\Types\Requests\CreateAccount;

$createAccountRequest = new CreateAccount(
    'Example Short Name',
    'Author Name',
    'https://t.me/author_url'
);
```

Note, that some of requests objects will validate in constructor and may throw exception (`Tegme\Exceptions\InvalidRequestsInfoException`).

See the exception message about detailed information.

Next step - let's call api.telegra.ph:

```
/**
 * @var TelegraphResponse $response
 */
$response = $telegraphClient->call($createAccountRequest);
```

`Tegme\Types\TelegraphResponse` - is simple wrapper for raw response.

You can get one of the Telegraph type (`Tegme\Types\Response\*`) via:

```
/** @var mixed $resultObj */
$resultObj = $response->getResult();
```

or raw response in array format:

```
/** @var array $rawResponse */
$rawResponse = $response->getRawResponse();
```

Note that telegraph client may throw exceptions (`Tegme\Exceptions\{TelegraphApiException, CurlException}`) while querying on api.telegra.ph

See exceptions messages about detailed information.

---

You can find all possible client usage [here (example folder)](https://github.com/alexandrmazur96/tegme/tree/master/example).

### Author

[](#author)

Mazur Alexandr -  -

### License

[](#license)

Tegme is licensed under the GNU General Public License - see the LICENSE file for details.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~4 days

Total

4

Last Release

2371d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1df16a30b0fe8682fcc23838dfe177aaf2bba74527a732a70e5b131b8966b24e?d=identicon)[Alexandr Mazur](/maintainers/Alexandr%20Mazur)

---

Top Contributors

[![alexandrmazur96](https://avatars.githubusercontent.com/u/20535375?v=4)](https://github.com/alexandrmazur96 "alexandrmazur96 (27 commits)")

---

Tags

telegraphtelegraph apitelegraph pusher

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[defstudio/telegraph

A laravel facade to interact with Telegram Bots

813290.9k3](/packages/defstudio-telegraph)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/common-protos

Google API Common Protos for PHP

173103.7M50](/packages/google-common-protos)

PHPackages © 2026

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