PHPackages                             maatify/telegram-bot - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. maatify/telegram-bot

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

maatify/telegram-bot
====================

Unofficial Telegram SDK for PHP it's library for maatify.dev Telegram Bot handler, known by our team

5.0.1(9mo ago)01791proprietaryPHP

Since Jul 28Pushed 9mo ago1 watchersCompare

[ Source](https://github.com/Maatify/TelegramBot)[ Packagist](https://packagist.org/packages/maatify/telegram-bot)[ Docs](https://github.com/Maatify/)[ RSS](/packages/maatify-telegram-bot/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (7)Dependencies (2)Versions (8)Used By (1)

[![Current version](https://camo.githubusercontent.com/de4970e6ce62dfa2c3fba8447ea62e8846e39365a031e5f61b6f5894c67d9e0f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d6161746966792f74656c656772616d2d626f74)](https://packagist.org/packages/maatify/telegram-bot)[![Packagist PHP Version Support](https://camo.githubusercontent.com/60dbd53e2a30ae1a4b843b2eb0abaa1a30e12d139f1f4353c21cc441495393eb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6d6161746966792f74656c656772616d2d626f74)](https://packagist.org/packages/maatify/telegram-bot)[![Monthly Downloads](https://camo.githubusercontent.com/7d2b978e9ffe9be7e1a50fb6e3e32f9c0b1e14d391310e087c978a1b14dd3be9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f6d6161746966792f74656c656772616d2d626f74)](https://packagist.org/packages/maatify/telegram-bot/stats)[![Total Downloads](https://camo.githubusercontent.com/7cb25cab5c5ae37f9e2344c82cc3cd3cbac623a147c0cde5a9fa1478a5d8f061/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d6161746966792f74656c656772616d2d626f74)](https://packagist.org/packages/maatify/telegram-bot/stats)[![Stars](https://camo.githubusercontent.com/28c18b256d8ad12802eaa7322d70822e2bdc79cd9900d30026c7a8d2fe1e87a7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f73746172732f6d6161746966792f74656c656772616d2d626f74)](https://github.com/maatify/telegram-bot/stargazers)

Installation
============

[](#installation)

```
composer require maatify/telegram-bot
```

 // telegram api references

Usage
=====

[](#usage)

### Instance

[](#instance)

```
use Maatify\TelegramBot\TelegramBotManager;

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

$telegram = TelegramBotManager::obj(__YOUR_API_KEY__); // instance of bot manager
```

### GetMe

[](#getme)

###### Get Bot Information

[](#get-bot-information)

A simple method for testing your bot's authentication token. Requires no parameters. Returns basic information about the bot in form of a User object.

```
$response = $telegram->Methods()->GetMe(); // get bot account information

print_r($response);
```

### logOut

[](#logout)

Use this method to log out from the cloud Bot API server before launching the bot locally. You must log out the bot before running it locally, otherwise there is no guarantee that the bot will receive updates. After a successful call, you can immediately log in on a local server, but will not be able to log in back to the cloud Bot API server for 10 minutes. Returns True on success. Requires no parameters.

```
$logout = $telegram->Methods()->Logout();
print_r($logout);
```

### Close

[](#close)

Use this method to close the bot instance before moving it from one local server to another. You need to delete the webhook before calling this method to ensure that the bot isn't launched again after server restart. The method will return error 429 in the first 10 minutes after the bot is launched. Returns True on success. Requires no parameters.

```
$close = $telegram->Methods()->Close();
print_r($close);
```

Webhook
=======

[](#webhook)

- WEBHOOK Usage and examples - [WEBHOOK.md](WEBHOOK.md)

Sender
======

[](#sender)

- Sending Files, Messages, Actions examples - [SENDER.md](SENDER.md)

Updates
=======

[](#updates)

- (To get the list of updates, the web Hook should not be set) examples - [UPDATES.md](UPDATES.md)

### GetChat

[](#getchat)

###### Get Chat By chat\_id

[](#get-chat-by-chat_id)

```
$chat = $telegram->GetChat(123456); // set getChat by chat_id

$by_chat                = $chat->Get();                 // get array of getChat
$chat_id                = $chat->GetID();               // get id from getChat by chat_id
$chat_first_name        = $chat->GetFirstName();        // get first_name from getChat
$chat_last_name         = $chat->GetLastName();         // get last_name from getChat
$chat_username          = $chat->GetUsername();         // get username from getChat
$chat_type              = $chat->GetType();             // get type from getChat
$chat_active_username   = $chat->GetActiveUsername();   // get array of active_username from getChat
```

getUserProfilePhotos
--------------------

[](#getuserprofilephotos)

Use this method to get a list of profile pictures for a user. Returns a UserProfilePhotos object.

```
try {
    $telegram->Downloader()->DownloadUserProfilePhotos($user_id);
} catch (Exception $e) {
    print_r($e->getMessage());
}
```

Login Page Example
------------------

[](#login-page-example)

- you can create login page with your bot examples - [LOGIN.md](LOGIN.md)

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance57

Moderate activity, may be stable

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity45

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

Recently: every ~92 days

Total

7

Last Release

280d ago

Major Versions

1.6.012 → 2.0.00122024-08-05

2.0.0015 → 5.0.12025-08-10

### Community

Maintainers

![](https://www.gravatar.com/avatar/1a885a0810f2762586520ab284c9019aaf0b650b53cdf2a6c13ea10931bb7795?d=identicon)[Maatify](/maintainers/Maatify)

---

Top Contributors

[![megyptm](https://avatars.githubusercontent.com/u/33574895?v=4)](https://github.com/megyptm "megyptm (47 commits)")

---

Tags

phphandlerbottelegram

### Embed Badge

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

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

PHPackages © 2026

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