Library / SDK
irazasyed/telegram-bot-sdk avatar
irazasyed/telegram-bot-sdk

irazasyed/telegram-bot-sdk: A PHP SDK for Telegram Bots with Laravel Support

🤖 Telegram Bot API PHP SDK. Lets you build Telegram Bots easily! Supports Laravel out of the box.

3,302 stars677 forksPHPBSD-3-Clause

At a glance

What is it?
This PHP SDK wraps the Telegram Bot API and ships a Laravel service provider, so you can register handlers and send messages without hand-rolling HTTP calls. The documentation is the weak spot, and the 4.x line lives in a separate repository.
Who is it for?
Adopt it if you already run PHP or Laravel and want the Telegram Bot API behind a typed client instead of raw cURL calls. Do not adopt it if you need the current Telegram Bot API surface today, since the README lists 4.x as in development in a separate repository, and 3.x is the only supported line here.
Can I use it commercially?
Yes. BSD-3-Clause is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 41 days ago.
What is it written in?
Mainly PHP, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 20, 2026, and from our analysis. They are not legal advice.

Editorial analysis

What irazasyed/telegram-bot-sdk actually removes from a PHP bot

Telegram's Bot API is an HTTP interface, as the README states, which means a PHP bot without an SDK is a pile of JSON payloads and cURL calls. This package is the layer between the two. It targets PHP developers who want to build Telegram bots, and it explicitly supports Laravel out of the box, which is the detail that decides most adoption. If your application is already a Laravel app, the SDK's service provider slot fits into the framework's existing configuration and container instead of sitting beside it. If you are writing plain PHP, the same client is still usable, but you lose the part of the pitch that matters most. The package is released under BSD 3-Clause, and the README notes the project and its author are not affiliated with Telegram.

How the SDK sits between your handlers and the Bot API

The repository layout is the clearest evidence of the architecture. The top level holds src/, tests/, composer.json, phpunit.xml.dist, rector.php and docgen.php. There is no separate framework package: the Laravel integration lives inside the same src/ tree, which is why the README can claim Laravel support without a second dependency. docgen.php is worth noting. It suggests parts of the documentation are generated from the source rather than hand-written, which is consistent with the README pointing at an external website for anything beyond installation. The data flow follows the Bot API's own model: your bot receives updates from Telegram, the SDK turns them into objects your code handles, and outgoing calls go back through the client. The README does not describe webhook registration or polling in detail, so treat the documentation site as the source for that part.

Installing telegram-bot-sdk with Composer

The README does not print an installation command. It points to the documentation site at telegram-bot-sdk.com, and the repository declares its dependency in composer.json, so Composer is the package manager involved. That is the extent of what can be stated without guessing at a command the project has not published here. Because the README lists 3.x as the current supported line and 2.x as unsupported, the version you pull matters: a constraint that resolves to 2.x puts you on a line the maintainers no longer support. The README's supported-versions table is the thing to read before you run anything, and the docs link for 3.x is marked with a construction-site icon rather than a checkmark, which is the project's own signal that 3.x documentation is incomplete.

The documentation gap is the real adoption cost

Look at the supported-versions table again. Version 2.x is unsupported but has documentation. Version 3.x is supported and its documentation link carries the in-progress marker. Version 4.x is marked as in development in a separate repository with no documentation at all. That is an awkward arrangement for anyone starting today: the line you are told to use is the one whose docs are unfinished, and the line that will replace it is somewhere else. The README itself delegates everything past the introduction to the website, so the repository will not answer questions about handler registration or update processing. This is not a reason to avoid the SDK, but it changes how you evaluate it. Budget time for reading source and tests rather than a tutorial, and check the 4.x repository before you commit to 3.x for a long-lived bot.

When a PHP Telegram SDK is the wrong choice

If your team is not a PHP team, this package is the wrong tool and no amount of Laravel convenience fixes that. The related searches around this project include Python, TypeScript, Go, Node.js and Java variants, which tells you the same need is served in other ecosystems. A Python or Node service with a Telegram library will be easier to staff and deploy than introducing PHP into a stack that has none. The second wrong case is a bot that only needs one or two Bot API calls. Pulling in an SDK, a service provider and a configuration file to send a single message is more moving parts than a direct HTTP request, and the SDK's value comes from handling many update types consistently. The third case is a bot that must track the newest Bot API features immediately, because the README shows a supported 3.x line and a 4.x line still in development elsewhere.

What it does differently from a generic HTTP client

The honest alternative is not another Telegram SDK, it is calling the Bot API directly from PHP with Guzzle or Laravel's HTTP client. The difference is where the structure lives. With a raw client, every update type and every method payload is your responsibility, and the Laravel integration is something you write. With this SDK, that structure is the package, and the Laravel wiring is already in src/. The trade is control for convention: a raw client never lags the Bot API, while an SDK is only as current as its last release. The release history shows v3.16.0 in March 2026, v3.15.0 in February 2025 and v3.14.0 in March 2024, so the cadence is roughly annual with a shorter gap before the most recent one. If your bot depends on a Bot API addition from after the latest release, the raw-client route gets there first.

Maintenance, licensing and upgrade exposure

The repository is not archived and the last push was on 2026-08-20, so commits are landing. The README states that only the latest released version is supported and that backward-incompatible changes are rare, which is a reasonable promise but not a guarantee. Upgrading from 2.x to 3.x is not a supported path in the sense that 2.x receives no fixes, so a bot stuck on 2.x is on its own. The BSD 3-Clause licence is permissive and includes a disclaimer of warranty; it also carries the usual clause about not using contributor names to endorse derived products. That is a summary of what the licence file contains, not legal advice, and the LICENSE.md in the repository is what governs your use. The practical upgrade risk is the 4.x line: when it becomes the recommended version, the README's own table implies a migration, and no migration guide is linked from this repository.

Editorial conclusion

Adopt it if you already run PHP or Laravel and want the Telegram Bot API behind a typed client instead of raw cURL calls. Do not adopt it if you need the current Telegram Bot API surface today, since the README lists 4.x as in development in a separate repository, and 3.x is the only supported line here. Before writing handlers, confirm the 3.x documentation status on telegram-bot-sdk.com and check whether the 4.x repository already covers the Bot API features you need.

Frequently asked questions

Is irazasyed/telegram-bot-sdk free to use?

It is released under the BSD 3-Clause License, which is a permissive open source licence. The licence file in the repository is what governs your use.

Does irazasyed/telegram-bot-sdk work with Laravel?

Yes. The README states the SDK supports Laravel out of the box, and the Laravel integration lives in the same src/ tree as the rest of the package rather than in a separate repository.

Is irazasyed/telegram-bot-sdk affiliated with Telegram?

No. The README's disclaimer states the project and its author are neither associated nor affiliated with Telegram in any way.

Which version of irazasyed/telegram-bot-sdk should I use?

The README's supported-versions table marks 3.x as current and supported, 2.x as unsupported, and 4.x as in development in a separate repository. Only the latest released version of the SDK is supported.

Official sources

  1. irazasyed/telegram-bot-sdk on GitHub
  2. License: BSD-3-Clause
  3. Project website
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/irazasyed-telegram-bot-sdk.svg)](https://hysenlabs.com/projects/irazasyed-telegram-bot-sdk)