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

Telegram Laravel Package

rmscms/telegram

A Laravel package for integrating Telegram bots into your application, providing a simple API for sending messages, handling updates and webhooks, and managing bot interactions from your PHP code.

Deep Wiki
Context7

telegram package for rmscms

Frequently asked questions about Telegram
How do I install rmscms/telegram in a Laravel application?
Install it with Composer using composer require rmscms/telegram. Laravel's package auto-discovery registers the service provider and facade, so no manual registration is usually needed. After installing, publish the package config file and add your bot token to your .env file.
Which Laravel and PHP versions does rmscms/telegram support?
The package is built around Laravel's service container, configuration system and facade, so it targets modern Laravel releases. Because version constraints change between releases, check the require section of the package's composer.json before upgrading your framework. Running composer why-not rmscms/telegram will show any conflicts in your project.
How do I configure my Telegram bot token with this package?
Publish the package configuration with the vendor:publish Artisan command, then set your bot token in the .env file rather than committing it to source control. The config file is where you register bots and default options such as the base API URL. Tokens should be treated as secrets and excluded from version control.
How do I send a message to a Telegram chat using the fluent message builder?
Resolve the bot through Laravel's container or the provided facade, then use the fluent message builder to set the chat, text, formatting and any media before sending. The builder wraps the raw Bot API payload, so you avoid writing HTTP calls by hand. Returning the API response lets you inspect message IDs or handle errors in your own code.
How do I set up a Telegram webhook for my Laravel bot?
Expose a POST route in your Laravel routes file and point Telegram at it with setWebhook, using your HTTPS URL. The package handles incoming updates so you can dispatch them to your own handlers for messages and callback queries. Remember to exclude the webhook route from CSRF protection since Telegram will not send a token.
Can I use long polling instead of webhooks with rmscms/telegram?
Yes, the package supports both webhook and long-polling update handling. Long polling is convenient for local development or servers without public HTTPS, typically driven by an Artisan or queue worker command. Webhooks are generally preferred in production because they avoid a permanently running polling process.
How do I handle inline keyboards and callback queries?
The package provides typed support for inline keyboards, so you attach buttons and callback data through the message builder instead of hand-writing nested arrays. Incoming callback queries arrive with the other updates and can be routed to your own handler logic. Answer the callback query promptly so the Telegram client stops showing a loading spinner.
How can I test my Telegram bot code without calling the real Telegram API?
Because the client is resolved from Laravel's container, you can bind a fake or mocked client in your test case and assert the outgoing payloads. This keeps tests fast and avoids hitting Telegram rate limits or leaking a live bot token. Feature tests can also post sample update payloads to your webhook route to verify your handlers.
Is rmscms/telegram safe to use in production?
The package is a thin wrapper over the Telegram Bot API, so production safety mostly depends on how you deploy it. Use HTTPS, verify the secret token header on your webhook route, keep bot tokens in environment variables, and push update processing onto queues for slow handlers. Also handle API errors and rate limits gracefully rather than assuming every send succeeds.
How does rmscms/telegram compare to other Laravel Telegram packages?
It is a lightweight option focused on Laravel integration: a fluent message builder, facade, container bindings, webhook and polling support, and an extensible client. Larger alternatives such as irazasyed/telegram-bot-sdk or Nutgram offer broader API coverage and more advanced conversation or middleware features. Choose based on how much of the Bot API surface you need and whether you prefer a minimal wrapper.
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.
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console