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();
Suggest a change
Last updated 02 December 2024