Skip to main content
Version: 2.x

Installation

Requirements

  • PHP >=5.6
  • Telegram Bot API Token - Talk to @BotFather and generate one
  • Laravel >=5 (Optional)

Installation

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:^2.0

Laravel Setup

Telegram Bot SDK will self-register its service provider and facade in Laravel >=5.5.

Laravel <5.5

If you're using Laravel <5.5, you'll manually have to register the service provider and facade.

Service Provider

Telegram\Bot\Laravel\TelegramServiceProvider::class,

Facade (Optional)

'Telegram' => Telegram\Bot\Laravel\Facades\Telegram::class,

Publish Configuration File

Publish the configuration file by running this command in your terminal window:

php artisan vendor:publish --provider="Telegram\Bot\Laravel\TelegramServiceProvider"