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

ActiveLibrary[API Development](/categories/api)

klev-o/telegram-bot-api
=======================

Simple and convenient object-oriented implementation Telegram bot API with php version ^7.4 support. You'll like it)

3.2.0(1y ago)457.8k↓25%12[1 PRs](https://github.com/klev-o/telegram-bot-api/pulls)1MITPHPPHP ^7.4.0 || ^8.0

Since Apr 1Pushed 1y ago1 watchersCompare

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

READMEChangelog (10)Dependencies (3)Versions (52)Used By (1)

[![TelegramBotApi](media/image.jpg)](media/image.jpg)

klev-o/telegram-bot-api
=======================

[](#klev-otelegram-bot-api)

Simple and convenient implementation Telegram bot API with php version ^7.4 support. You'll like it)

Based on the [Official Telegram api](https://core.telegram.org/bots/api)

[![License](https://camo.githubusercontent.com/d0d15d33bf03d6287d2c9671d499d93deb3e9ffc1095674ea9d185a2b923175f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6b6c65762d6f2f74656c656772616d2d626f742d617069)](https://github.com/klev-o/telegram-bot-api/blob/master/LICENSE)[![Packagist Downloads](https://camo.githubusercontent.com/c18560c1115f590478c4c3f327c66c14b1f55187dd19d654c5b6210878016d6f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6b6c65762d6f2f74656c656772616d2d626f742d617069)](https://camo.githubusercontent.com/c18560c1115f590478c4c3f327c66c14b1f55187dd19d654c5b6210878016d6f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6b6c65762d6f2f74656c656772616d2d626f742d617069)[![GitHub release (latest by date including pre-releases)](https://camo.githubusercontent.com/e42607ace16519e26ecbe7115e41ce3ebc9ad3032a2cf9687bc65e437416b5dd/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f6b6c65762d6f2f74656c656772616d2d626f742d6170693f696e636c7564655f70726572656c6561736573)](https://camo.githubusercontent.com/e42607ace16519e26ecbe7115e41ce3ebc9ad3032a2cf9687bc65e437416b5dd/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f6b6c65762d6f2f74656c656772616d2d626f742d6170693f696e636c7564655f70726572656c6561736573)[![Scrutinizer code quality (GitHub/Bitbucket)](https://camo.githubusercontent.com/b1763812d08a572bb0934a4e5452bde7035841c78695b45450231345fbda21aa/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f7175616c6974792f672f6b6c65762d6f2f74656c656772616d2d626f742d617069)](https://camo.githubusercontent.com/b1763812d08a572bb0934a4e5452bde7035841c78695b45450231345fbda21aa/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f7175616c6974792f672f6b6c65762d6f2f74656c656772616d2d626f742d617069)[![GitHub last commit](https://camo.githubusercontent.com/3494ff728fb96134942313638c068d0f3b7fe9ff28935c1e5456beadd2c68984/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6173742d636f6d6d69742f6b6c65762d6f2f74656c656772616d2d626f742d617069)](https://camo.githubusercontent.com/3494ff728fb96134942313638c068d0f3b7fe9ff28935c1e5456beadd2c68984/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6173742d636f6d6d69742f6b6c65762d6f2f74656c656772616d2d626f742d617069)

📖Intro
------

[](#intro)

This bot is full support [Official Telegram api](https://core.telegram.org/bots/api). Fully object-oriented and simple code. All available types and methods are described using classes with documentation of all fields. You don't even need to refer to the official documentation - all descriptions are present in the bot! But still, for each class, the url to the documentation is indicated, where you can study the nuances, etc.

You just have to relax and create super bots!

**Attention!** At the moment, the bot only supports receiving updates through Webhook. Webhook is more efficient than Long-Polling, reduces server load and guarantees almost instant data refresh for your application. But it is worth considering some of the nuances, in more detail [here](https://core.telegram.org/bots/faq#im-having-problems-with-webhooks)

🛠 Installation
--------------

[](#-installation)

Run this command in your command line:

```
composer require klev-o/telegram-bot-api

```

🔌Usage
------

[](#usage)

### Setting up a webhook

[](#setting-up-a-webhook)

First, you need to install Webhook, to which the telegram will send updates. This can be done using the following code:

```
