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

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

oihso/telegram-bot-api-bundle
=============================

A simple wrapper for telegram-bot-api.

v2.0.1(2y ago)032BSD-3-ClausePHPPHP ^8.2 || ^8.3

Since Feb 26Pushed 2y agoCompare

[ Source](https://github.com/Oihso/TelegramBotApiBundle)[ Packagist](https://packagist.org/packages/oihso/telegram-bot-api-bundle)[ RSS](/packages/oihso-telegram-bot-api-bundle/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (1)Dependencies (5)Versions (3)Used By (0)

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

[](#telegrambotapibundle)

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

What's the difference with the original one?
--------------------------------------------

[](#whats-the-difference-with-the-original-one)

- Updated to Symfony 6.4/7.0 (Temporarily removed Symfony 7 support until the authors of irazasyed/telegram-bot-sdk and illuminate/support will bump their package requirements)
- Fixed some deprecations

Install
-------

[](#install)

Via Composer

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

### If moving from original bundle

[](#if-moving-from-original-bundle)

1. Remove old package by running `composer remove borsaco/telegram-bot-api-bundle`
2. Change use statements in your code from `Borsaco\...` to `Oihso\...`
3. Install new package by running `composer require oihso/telegram-bot-api-bundle`

New version of package is fully compataible with the old one. No need to change config/code except for use statements

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 Oihso\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

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 75.9% 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 ~0 days

Total

2

Last Release

859d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/313dd3dbcd2d7ab57527b5ad5007f7a662b1a0d7796f6adbe7126c3a8c1856d1?d=identicon)[Oihso](/maintainers/Oihso)

---

Top Contributors

[![seddighi78](https://avatars.githubusercontent.com/u/29895767?v=4)](https://github.com/seddighi78 "seddighi78 (44 commits)")[![Oihso](https://avatars.githubusercontent.com/u/35115534?v=4)](https://github.com/Oihso "Oihso (7 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

phpapisymfonybottelegramtelegram bot api

### Embed Badge

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

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

PHPackages © 2026

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