This guide provides instructions for installing and setting up the Telegram Bot SDK
- 🐘 PHP 8.0 and higher
- 🔑 Telegram Bot Token - Talk to @BotFather and generate one.
- 🧰 Laravel 9 and higher (Optional)
🔑 Obtaining Telegram Bot Token
- Open the Telegram app and message @BotFather.
- Follow the instructions to create a new bot.
- After creating the bot, the "BotFather" bot will give you a bot token. Keep this token safe, as you will need it to use the Telegram Bot API.
Your bot token is its unique identifier – store it in a secure place, and avoid sharing with anyone or publishing your bot token anywhere. Everyone who has your token will have full control over your bot.
Telegram Bot SDK utilizes Composer to manage its dependencies. So, before using the SDK, make sure you have Composer installed on your machine.
Install the Telegram Bot SDK using Composer:
composer require irazasyed/telegram-bot-sdk
🧰 Laravel Setup
Telegram Bot SDK will self-register its service provider and facade in Laravel.
🚀 Publish Configuration File
Publish the configuration file by running this command in your terminal window:
php artisan vendor:publish --tag="telegram-config"