PHPackages                             zelenin/telegram-bot-api - 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. zelenin/telegram-bot-api

ActiveLibrary[API Development](/categories/api)

zelenin/telegram-bot-api
========================

Telegram Bot API Client

1.5.0(9y ago)5917.2k20[2 issues](https://github.com/zelenin/telegram-bot-api/issues)[1 PRs](https://github.com/zelenin/telegram-bot-api/pulls)MITPHPPHP &gt;=5.5.0CI failing

Since Jun 27Pushed 5y ago9 watchersCompare

[ Source](https://github.com/zelenin/telegram-bot-api)[ Packagist](https://packagist.org/packages/zelenin/telegram-bot-api)[ Docs](https://github.com/zelenin/telegram-bot-api)[ RSS](/packages/zelenin-telegram-bot-api/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (1)Versions (14)Used By (0)

Telegram Bot API Client
=======================

[](#telegram-bot-api-client)

[Telegram](https://telegram.org) [Bot](https://core.telegram.org/bots) [API](https://core.telegram.org/bots/api) Client.

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

[](#installation)

### Composer

[](#composer)

The preferred way to install this extension is through [Composer](http://getcomposer.org/).

Either run

```
php composer.phar require "zelenin/telegram-bot-api" "~1.0"

```

or add

```
"zelenin/telegram-bot-api": "~1.0"

```

to the require section of your `composer.json`

Usage
-----

[](#usage)

```
$api = ApiFactory::create($token);

try {
    $response = $api->sendMessage([
        'chat_id' => $chatId,
        'text' => 'Test message'
    ]);
    print_r($response);

    $response = $api->sendPhoto([
    	'chat_id' => $myId,
    	'photo' => fopen('/home/www/photo.jpg', 'r')
    ]);
    print_r($response);
} catch (\Zelenin\Telegram\Bot\Exception\NotOkException $e) {
    echo $e->getMessage();
}
```

See [Bot API documentation](https://core.telegram.org/bots/api) for other methods.

### Daemon

[](#daemon)

```
$api = ApiFactory::create($token);

$daemon = new \Zelenin\Telegram\Bot\Daemon\NaiveDaemon($api);

$daemon
    ->onUpdate(function (\Zelenin\Telegram\Bot\Type\Update $update) {
        print_r($update);
    });

$daemon->run();
```

Author
------

[](#author)

[Aleksandr Zelenin](https://github.com/zelenin/), e-mail:

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity37

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 87.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 ~35 days

Recently: every ~41 days

Total

13

Last Release

3600d ago

Major Versions

0.0.10 → 1.0.02016-04-13

### Community

Maintainers

![](https://www.gravatar.com/avatar/0de51e0d5cd7141a2189ae926d4a3c449d5d41fda7c6b63b08869eb3c1e53b9a?d=identicon)[zelenin](/maintainers/zelenin)

---

Top Contributors

[![zelenin](https://avatars.githubusercontent.com/u/1427885?v=4)](https://github.com/zelenin "zelenin (36 commits)")[![dzayatc](https://avatars.githubusercontent.com/u/15669552?v=4)](https://github.com/dzayatc "dzayatc (2 commits)")[![Mehrdad-Dadkhah](https://avatars.githubusercontent.com/u/3860685?v=4)](https://github.com/Mehrdad-Dadkhah "Mehrdad-Dadkhah (1 commits)")[![MiRHaDi](https://avatars.githubusercontent.com/u/5154521?v=4)](https://github.com/MiRHaDi "MiRHaDi (1 commits)")[![Mirocow](https://avatars.githubusercontent.com/u/376396?v=4)](https://github.com/Mirocow "Mirocow (1 commits)")

---

Tags

apibottelegram

### Embed Badge

![Health badge](/badges/zelenin-telegram-bot-api/health.svg)

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

###  Alternatives

[longman/telegram-bot

PHP Telegram bot

4.1k2.2M52](/packages/longman-telegram-bot)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M45](/packages/tencentcloud-tencentcloud-sdk-php)[nutgram/nutgram

The Telegram bot library that doesn't drive you nuts

737290.3k8](/packages/nutgram-nutgram)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

273.0k](/packages/eslazarev-wildberries-sdk)[files.com/files-php-sdk

Files.com PHP SDK

2481.1k](/packages/filescom-files-php-sdk)[bushlanov-dev/max-bot-api-client-php

Max Bot API Client library

486.3k](/packages/bushlanov-dev-max-bot-api-client-php)

PHPackages © 2026

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