PHPackages                             yabx/telegram - 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. yabx/telegram

ActiveLibrary[API Development](/categories/api)

yabx/telegram
=============

Telegram Bot API SDK for PHP 8.1+

8.1.2(7mo ago)12.7k↓100%1MITPHPPHP &gt;=8.1

Since Mar 28Pushed 7mo ago1 watchersCompare

[ Source](https://github.com/yabx-net/telegram)[ Packagist](https://packagist.org/packages/yabx/telegram)[ RSS](/packages/yabx-telegram/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (33)Used By (1)

Telegram Bot API SDK for PHP 8.1+
---------------------------------

[](#telegram-bot-api-sdk-for-php-81)

- Bot API 8.1 (December 4, 2024)
- HTTP-Client based on Guzzle
- Full support of all available types according
- Full support of all available methods according

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

[](#installation)

```
composer req yabx/telegram
```

Sending messages
----------------

[](#sending-messages)

```
use Yabx\Telegram\BotApi;

// Create an BotApi client instance
$tg = new BotApi('123:qwe');

// Sending message
$message = $tg->sendMessage(12345, 'Hello World!');
```

Working with webhooks
---------------------

[](#working-with-webhooks)

```
use Yabx\Telegram\BotApi;

// Create an BotApi client instance
$tg = new BotApi('123:qwe');

// Set webhook
$tg->setWebhook('https://tg.myservice.com/bot123');

// Get webhook info
$webhook = $tg->getWebhookInfo();
```

Receiving updates from webhook
------------------------------

[](#receiving-updates-from-webhook)

```
use Yabx\Telegram\BotApi;

// Parse telegram webhook
$update = BotApi::getUpdateFromRequest();
// or
$update = BotApi::getUpdateFromJson($json);

// Get Message object
$message = $update->getMessage();

// Get Sender and Chat objects
$sender = $message->getFrom();
$chat = $message->getChat();

// Get some message attributes
$text = $message->getText();
$video = $message->getVideo();
$photos = $message->getPhotos();
$document = $message->getDocument();
```

###  Health Score

43

—

FairBetter than 91% of packages

Maintenance64

Regular maintenance activity

Popularity22

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity64

Established project with proven stability

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

Recently: every ~79 days

Total

32

Last Release

220d ago

Major Versions

0.5.3 → 7.9.02024-08-22

7.10.4 → 8.0.02024-11-20

PHP version history (2 changes)0.1.0PHP &gt;=8.0

0.3.0PHP &gt;=8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/63879dd901c9fe1b39a20e7847dbc93d69c19a8b3e7e7480bca1a993df1e267c?d=identicon)[yauhenko](/maintainers/yauhenko)

---

Top Contributors

[![yauhenko](https://avatars.githubusercontent.com/u/4437817?v=4)](https://github.com/yauhenko "yauhenko (41 commits)")

---

Tags

apisdkbottelegramtelegram bottelegram bot apitelegram sdktelegram php

### Embed Badge

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

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

###  Alternatives

[irazasyed/telegram-bot-sdk

The Unofficial Telegram Bot API PHP SDK

3.3k4.5M84](/packages/irazasyed-telegram-bot-sdk)[telegram-bot-sdk/telegram-bot-sdk

The Telegram Bot API PHP SDK

32480.5k](/packages/telegram-bot-sdk-telegram-bot-sdk)[exileed/telegram-bot-api

The Telegram Bot API PHP

1514.1k](/packages/exileed-telegram-bot-api)

PHPackages © 2026

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