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

ActiveSymfony-bundle[API Development](/categories/api)

borsaco/telegram-bot-api-bundle
===============================

A simple wrapper for telegram-bot-api.

v1.1.2(4y ago)5633.0k↑11.1%17BSD-3-ClausePHPPHP &gt;=7.2

Since Jul 16Pushed 4y ago2 watchersCompare

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

READMEChangelog (9)Dependencies (2)Versions (10)Used By (0)

TelegramBotApiBundle
====================

[](#telegrambotapibundle)

A symfony wrapper bundle for [Telegram Bot API](https://core.telegram.org/bots/api).

Install
-------

[](#install)

Via Composer

```
composer require borsaco/telegram-bot-api-bundle
```

Configure the bundle
--------------------

[](#configure-the-bundle)

This bundle was designed to just work out of the box. The only thing you have to configure in order to get this bundle up and running is your bot [token](https://core.telegram.org/bots#botfather).

```
# config/packages/telegram.yaml

telegram_bot_api:
    # Proxy (optional) :
    #proxy: 'socks5h://127.0.0.1:5090' # this is example you have to change this
    #async_requests: false

    # Development section:
    development:
        # implement in next version
        # Telegram user_id of developers accounts
        developers_id: [1234567, 87654321]
        # If this mode is enabled, the robot only responds to the developers
        maintenance:
            text: "The robot is being repaired! Please come back later."

    # Bots:
    bots:
        # The bot name
        first:
            # Your bot token: (required)
            token: 123456789:ABCD1234****4321CBA
            maintenance: false
        second:
            # Your bot token: (required)
            token: 123456789:ABCD1234****4321CBA
            maintenance: false

    # The default bot returned when you call getBot()
    default: 'second'
```

Usage
-----

[](#usage)

You can access the bot in the controller with :

```
    use Borsaco\TelegramBotApiBundle\Service\Bot;

    ...

    public function index(Bot $bot)
    {
        $firstBot = $bot->getBot('first');
        $firstBot->getMe();
    }
```

Webhook
-------

[](#webhook)

In order to receive updates via a Webhook, You first need to tell your webhook URL to Telegram. You can use setWebhook method to specify a url and receive incoming updates via an outgoing webhook or use this commands:.

for get information about webhook of bot:

```
    $ php bin/console telegram:bot:webhook:info
```

for set webhook url for the bot:

```
    $ php bin/console telegram:bot:webhook:set
```

for delete webhook of the bot:

```
    $ php bin/console telegram:bot:webhook:delete
```

Once you set the webhook using the setWebhook method, You can then use the below function to retrieve the updates that are sent to your Webhook URL. The function returns an array of Update objects.

```
    $updateArray = $firstBot()->getWebhookUpdate();
```

Maintenance
-----------

[](#maintenance)

If want to use maintenance of bots you can check `$bot->isMaintenance('bot_name')` in your entry point controller and send response message.

Next...
-------

[](#next)

Please refer to [Telegram Bot API Official Document](https://core.telegram.org/bots/api) for getting information about available methods and other informations.

Troubleshooting
---------------

[](#troubleshooting)

If you did all the configurations correctly but still getting errors (Http error 500) even on getMe() method, it might be because of SSL Verification. Please make sure you have up-to-date CA root certificate bundle to be used with cURL.

You can configure you CA root certificate bundle by:

1. Downloading up-to-date cacert.pem file from cURL website and
2. Setting a path to it in your php.ini file, e.g. on Windows:

`curl.cainfo=c:\php\cacert.pem`

You can test your SSL-setup online with this handy webtool on: [SSL Labs](https://www.ssllabs.com/ssltest)

License
-------

[](#license)

The BSD License. Please see [License File](LICENSE) for more information.

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity41

Moderate usage in the ecosystem

Community18

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 86.3% 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 ~116 days

Recently: every ~163 days

Total

9

Last Release

1570d ago

PHP version history (2 changes)1.0.0PHP &gt;=7.1

v1.1.1PHP &gt;=7.2

### Community

Maintainers

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

---

Top Contributors

[![seddighi78](https://avatars.githubusercontent.com/u/29895767?v=4)](https://github.com/seddighi78 "seddighi78 (44 commits)")[![b1rdex](https://avatars.githubusercontent.com/u/312855?v=4)](https://github.com/b1rdex "b1rdex (3 commits)")[![corpsee](https://avatars.githubusercontent.com/u/1416706?v=4)](https://github.com/corpsee "corpsee (2 commits)")[![artemdigi](https://avatars.githubusercontent.com/u/34234796?v=4)](https://github.com/artemdigi "artemdigi (1 commits)")[![DaWulli](https://avatars.githubusercontent.com/u/8543674?v=4)](https://github.com/DaWulli "DaWulli (1 commits)")

---

Tags

symfonytelegramtelegram-botphpapisymfonybottelegramtelegram bot api

### Embed Badge

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

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

###  Alternatives

[harmbandstra/swagger-ui-bundle

Exposes swagger UI inside your Symfony project through a route (eg. /docs)

42867.3k](/packages/harmbandstra-swagger-ui-bundle)[klev-o/telegram-bot-api

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

457.8k1](/packages/klev-o-telegram-bot-api)[klev-o/crypto-pay-api

Simple and convenient implementation of the Crypto Pay payment system (@CryptoBot)

205.1k](/packages/klev-o-crypto-pay-api)[kuvardin/telegram-bots-api

SDK for Telegram bots API

145.5k](/packages/kuvardin-telegram-bots-api)

PHPackages © 2026

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