DEF STUDIO srl

Setting a webhook for the bot

A webhook lets your bot to answer commands issued from telegram chats and buttons inside messages

through an artisan command

php artisan telegraph:set-webhook {bot_id}

the bot_id argument is mandatory if you have created more than one bot

programmatically

A webhook can be created programmatically for a bot by calling its registerWebhook() method

/** @var TelegraphBot $bot */
$bot->registerWebhook()->send();
Edit this page
Last updated 26 April 2024