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
Driver Telegram

Driver Telegram Laravel Package

botman/driver-telegram

Telegram driver for BotMan, the PHP chatbot framework. Connect your Laravel or plain PHP app to the Telegram Bot API and build conversational bots with commands, conversations, inline keyboards, and rich media through BotMan's expressive, framework-agnostic API.

Deep Wiki
Context7

BotMan Telegram Driver

Frequently asked questions about Driver Telegram
How do I install botman/driver-telegram in a Laravel application?
Install it with Composer alongside the BotMan core package, typically via composer require botman/botman botman/driver-telegram. Because the driver's last release was in September 2020, pin exact versions and run the install inside a disposable branch or spike environment first so you can confirm the dependency graph resolves against your PHP and Laravel versions. After installing, register the Telegram driver with BotMan and add your bot token to configuration.
Does botman/driver-telegram work with Laravel 10, 11, and PHP 8?
That is not guaranteed out of the box. The driver's most recent release dates from 2020-09-24, before PHP 8 and modern Laravel versions became standard, so compatibility must be proven with a short spike on your exact runtime rather than assumed. Pin Composer versions, test the BotMan core version, cache driver, and queue backend together, and be prepared to patch or fork if deprecations or type errors appear.
Should I use the Telegram webhook or long polling with this driver?
Both delivery modes are supported, and the right choice depends on your hosting. Webhooks are usually better for Laravel apps behind HTTPS because updates arrive as normal requests and avoid a constantly running process, while long polling suits local development or environments without public URLs. Validate whichever you pick, including webhook routing, CSRF exclusions, and duplicate update handling, before relying on it in production.
How do I register the Telegram driver with BotMan?
You load the driver and pass your Telegram bot token when constructing the BotMan instance, using the driver's own loader or BotMan's driver manager. In Laravel, the package's service provider integration handles much of the wiring, so you mainly configure the token and the driver-specific settings. Keep the bot configuration in environment variables rather than committing tokens to source control.
Does botman/driver-telegram support inline keyboards and callback queries?
Yes, the driver supports Telegram's reply markup, including inline keyboards and custom reply markup, along with callback query handling that flows through BotMan's conversational API. This means you can build button-driven flows without making raw Telegram Bot API calls. Test callback payloads explicitly, since the 2020-era driver may not cover every newer Telegram update type.
Is botman/driver-telegram still maintained and safe for production?
Community signal is modest, around 94 stars, and the last release was 2020-09-24, with the source repository listed as unknown. Treat it as medium-to-high risk for production-critical workflows and assign an owner for dependency stewardship, vulnerability scanning, and periodic compatibility testing. Confirm the repository is available, forkable, and license-compatible, and have a fallback plan such as a maintained fork or a direct Telegram API client.
Does the driver validate Telegram webhook secret tokens?
This is not confirmed by the available documentation, and a 2020-era driver may rely on URL secrecy rather than the newer secret token header check. Do not assume authenticity validation is built in. Verify the behaviour during your spike, and add your own middleware check on the X-Telegram-Bot-Api-Secret-Token header if the driver does not enforce it.
Can I send photos, documents, audio, and locations with botman/driver-telegram?
Yes, the driver handles photos, documents, audio, and location messages, plus the Telegram payload formatting needed to send them. Rich media should be exercised early in testing because file uploads and URL-based media behave differently and often surface escaping or timeout problems. For slow outbound work, push sending onto queue workers instead of handling it inline in the webhook request.
What are the alternatives to botman/driver-telegram?
If you are already committed to BotMan, the practical alternatives are maintaining a fork of this driver, replacing it behind an internal abstraction, or calling the Telegram Bot API directly from a thin service class. If you are not on BotMan, adopting this driver means adopting BotMan's conventions and lifecycle, so evaluate a dedicated Telegram SDK first. Whichever route you take, keep bot responses behind your own interface so the transport can be swapped later.
How do I test a BotMan Telegram bot without calling the real Telegram API?
Build regression tests around expected Telegram update payloads and feed them through your handlers, which lets you assert command routing, conversations, media, and keyboards without network calls. Keep handlers transport-agnostic so they can be tested independently of the driver. For a broader check, run a disposable bot in a spike environment with pinned dependencies and exercise both webhook and polling transports before piloting a low-risk internal bot.
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.
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect
youbar/easy-crud
c-point-labs/laravel-hostyourai
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo