DEF STUDIO srl

Need help with Laravel and web development?

Hire one of our experts for your projects.

We build tailored products, websites and platforms — with care for UX, performance and maintainability.

Booking open for Q4 — limited slots

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 22 September 2025