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

ActiveLibrary[API Development](/categories/api)

alexvkokin/telegram-bot-api
===========================

Telegram Bot Api

0.1.0(1y ago)06MITPHPPHP ^8.2

Since Oct 21Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/alexvkokin/telegram-bot-api)[ Packagist](https://packagist.org/packages/alexvkokin/telegram-bot-api)[ RSS](/packages/alexvkokin-telegram-bot-api/feed)WikiDiscussions 0.1.x Synced 1mo ago

READMEChangelog (1)Dependencies (11)Versions (2)Used By (0)

Telegram Bot API for PHP
========================

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

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

[](#requirements)

- PHP 8.2 or higher.

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

[](#installation)

The package could be installed with [Composer](https://getcomposer.org/download/):

```
composer require alexvkokin/telegram-bot-api
```

Example
-------

[](#example)

```
use Alexvkokin\TelegramBotApi\Client\TelegramClient;
use Alexvkokin\TelegramBotApi\Method\SendMessage;
use Alexvkokin\TelegramBotApi\Method\SendPhoto;
use Alexvkokin\TelegramBotApi\Method\GetMe;
use Alexvkokin\TelegramBotApi\TelegramBotApi;
use Alexvkokin\TelegramBotApi\Type\InputFile;
use GuzzleHttp\Client;
use HttpSoft\Message\RequestFactory;
use HttpSoft\Message\StreamFactory;

require_once __DIR__ . '/../../vendor/autoload.php';

$token = 'YOUR_BOT_TOKEN';
$chatId = 123456789;

// Telegram API BOT client
$api = new TelegramBotApi(
    $token,
    new TelegramClient(
        new Client(),
        new RequestFactory(),
        new StreamFactory(),
    )
);

// get bot info
$method = new GetMe();
$response = $api->send($method);

// send message
$method = new SendMessage(
    chat_id: $chatId,
    text: 'Hello, world!',
);
$response = $api->send($method);

// send local file
$method = new SendPhoto(
    chat_id: $chatId,
    photo: InputFile::withLocalFile(__DIR__.'/../imgs/screen.png', 'screenshot 1'),
);
$response = $api->send($method);
```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance63

Regular maintenance activity

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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

Total

2

Last Release

125d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/624777919a96312b88b3d239e6bdb17c9efb382255d722866a1b218144d5d572?d=identicon)[alexk00](/maintainers/alexk00)

---

Top Contributors

[![alexvkokin](https://avatars.githubusercontent.com/u/5352981?v=4)](https://github.com/alexvkokin "alexvkokin (12 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M647](/packages/sylius-sylius)[theodo-group/llphant

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

1.5k311.5k5](/packages/theodo-group-llphant)[getbrevo/brevo-php

Official Brevo provided RESTFul API V3 php library

963.1M35](/packages/getbrevo-brevo-php)[swisnl/json-api-client

A PHP package for mapping remote JSON:API resources to Eloquent like models and collections.

211473.2k12](/packages/swisnl-json-api-client)[wordpress/php-ai-client

A provider agnostic PHP AI client SDK to communicate with any generative AI models of various capabilities using a uniform API.

26236.6k14](/packages/wordpress-php-ai-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)

PHPackages © 2026

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