← Back to Packages

Package

Laravel Telegram

PHP Laravel

Stateless Telegram Bot API client for Laravel with webhook update parsing and secret-token verification.

Overview

Covers both directions of a Telegram integration: TelegramClient sends messages and registers the webhook, while TelegramWebhookSecretVerifier and TelegramUpdateParser handle incoming updates by verifying the secret header and parsing updates into typed command objects. A bot cannot message a user first; the chat_id only arrives after the user presses Start.

Installation

composer require labrodev/laravel-telegram

Tips

  • Generate your own webhook secret, e.g. openssl rand -hex 32, and register it with setWebhook().
  • Telegram echoes the secret back in the X-Telegram-Bot-Api-Secret-Token header on every update.
  • The bot token rides in the request URL path itself, so never log it or a failed-request message.
View on GitHub →