1. Go to this page and download the library: Download gusaln/simple-tg-bot-api library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
gusaln / simple-tg-bot-api example snippets
$botToken = '<bot token>';
$api = new \GusALN\TelegramBotApi\BotApi(
$botToken,
new \GusALN\TelegramBotApi\Client\GuzzleClient()
);
// If no ClientInterface is provided as second argument, a GuzzleClient is created by default.
$api = new \GusALN\TelegramBotApi\BotApi($botToken);