Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Telebot Laravel Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Channel expansion without new infrastructure. This package turns an existing Laravel app into a Telegram bot host — one 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.
  • Feature: transactional notifications. The 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.
  • Feature: ops/error alerting. The log driver routes application logs into a Telegram chat. A credible cheap alternative to standing up a new observability vendor for small teams or internal tools.
  • Feature: interactive bot workflows. Command handlers, callback handlers, and 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.
  • Architecture: multi-bot in one codebase. 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.
  • Build vs. buy. Everything this package does is buildable in-house — webhook route, secret-token validation, update parsing, handler pipeline, polling fallback, DTOs for API types. The buy argument is that this is undifferentiated plumbing we should not own. MIT license means the "buy" is really "adopt and be willing to fork."
  • Roadmap phasing this enables: (1) outbound notifications → (2) log/alert driver → (3) command-based self-service → (4) multi-step stateful flows → (5) Telegram Web App / mini-app surface. Each phase is independently shippable and independently abandonable.
  • Also informs: whether to expose Telegram as a user-selectable notification preference in settings, and whether support/ops should treat a Telegram chat as a first-class ticket intake.

When to Consider This Package

Consider adoption when:

  • The product is already Laravel/PHP, and the team values framework-native ergonomics: facade, published config, artisan generators, notification + log drivers.
  • You need both webhook (production) and long polling (local/dev or no public endpoint) without writing two code paths.
  • You need request validation built in — POST/JSON checks, bot-token match against config, X-Telegram-Bot-Api-Secret-Token verification, single-update-type validation. That is security-adjacent work you do not want hand-rolled.
  • You need stateful multi-step conversations and want a StorageContract you can back with your own Eloquent model rather than inventing session handling.
  • You need all official Bot API methods plus typed DTOs with dot-notation access, promise support, and _rescue error hooks for 401/403/429/network handling.
  • You want one Laravel app to host multiple bots rather than a service per bot.

Look elsewhere or build thin when:

  • Support depth is a hard requirement. ~15 stars implies a very small user base and a corresponding bus-factor. There is no meaningful community to lean on for edge cases.
  • You only need one-way notifications, rarely. A single queued HTTP POST to api.telegram.org is less code than a dependency.
  • You need a proven, widely-deployed Laravel Telegram SDK with years of production history across many teams — evaluate the more established ecosystem options before committing.
  • You are not on Laravel (plain Symfony, or a polyglot stack) — the value here is largely the Laravel glue.
  • You need guarantees on release cadence, security response time, or LTS support that a single-maintainer package cannot contractually provide.
  • Your required Telegram surface isn't documented. Guidance is explicitly scoped to documented features; confirm coverage of the specific API methods, payment flows, or media handling you need before committing.

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.

How to Pitch It (Stakeholders)

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.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib