westacks/telebot-laravel
A Laravel integration for the Telegram Bot API that simplifies building bots with a fluent interface, webhook and polling support, and framework-friendly configuration for sending messages, handling updates, and managing bot commands in PHP applications.
composer require, one artisan install, and a config file. That makes "add Telegram as a notification/delivery channel" a days-not-quarters decision rather than a platform project.telegram notification channel lets existing Laravel Notification classes fan out to Telegram alongside mail/SMS/push. Low effort, immediately user-visible — the strongest candidate for a first release.RequestInputHandler with pluggable state storage cover the "conversational form" pattern — onboarding, support triage, internal approvals, KYC-style step collection. This is where roadmap value compounds beyond one-way messaging.BotManager supports several named bots (customer-facing + internal ops) from one deployment, which supports decisions like "do we run a separate service per bot?" — answer: no, not yet.Consider adoption when:
X-Telegram-Bot-Api-Secret-Token verification, single-update-type validation. That is security-adjacent work you do not want hand-rolled.StorageContract you can back with your own Eloquent model rather than inventing session handling._rescue error hooks for 401/403/429/network handling.Look elsewhere or build thin when:
api.telegram.org is less code than a dependency.Diligence checklist before adoption: pin the version; verify actual release cadence and issue responsiveness (registry shows a 2026-08-25 release — confirm this reflects ongoing maintenance); confirm token/secret handling fits your secrets policy (config reads from .env); confirm api_url is configurable if you need a self-hosted Bot API endpoint; decide up front whether you would fork under MIT if the package stalls.
To executives (one paragraph): We can add Telegram as a delivery channel — notifications, operational alerts, and eventually self-service bot flows — inside the Laravel application we already run, with no new infrastructure, no vendor contract, and no per-message platform fee. It is MIT-licensed and installs in a single dependency. The realistic first milestone is transactional notifications and error alerting in days; conversational bot flows are a follow-on increment of one to two sprints. The main risk is that this is a small, thinly-adopted open-source package, so we will keep our bot logic thin and behind our own interface — swapping it out later is a contained change, not a rewrite.
To engineering (why this and not hand-rolled HTTP): It ships the tedious, easy-to-get-wrong parts — webhook route registration per bot, UpdateRequest validation including secret-token matching, a chain-of-responsibility handler pipeline with Kernel, typed DTOs for all Bot API types with dot-notation access, Guzzle promise support, a _rescue callback for explicit 401/403/429/network handling, artisan generators for kernels and handlers, telebot:webhook / telebot:polling / telebot:commands lifecycle commands with graceful signal shutdown, a notification channel, a log driver, and multi-bot BotManager. State storage is an interface, so we back it with our own model instead of files in production.
To security/compliance: Tokens live in .env via published config; webhook requests are validated on method, JSON body, bot token in the URL, secret token header, and update shape. Calls go only to a configurable api_url, defaulting to api.telegram.org.
The honest caveat to state up front: adoption is low and the maintainer base is small. We mitigate by pinning versions, keeping bot code isolated behind our own service boundary, and accepting that a fork under MIT is a plausible outcome.
How can I help you explore Laravel packages today?