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

Manual updates polling

As an aternative to set up a webhook, a bot updates can be fetched by periodically polling Telegram APIs

Warning

Manual updates polling is not available if a webhook is set up for the bot. Webhook should be remove first using its unregisterWebhook method

in order to get the updates, an ->updates() method is available in the TelegraphBot model:

$updates = $telegraphBot->updates();

the call will result in a collection of DefStudio\Telegraph\DTO\TelegramUpdate instances, one for each update, sorted by the oldest one.

It is advised to keep track of the TelegramUpdate::id() in order to avoid processing the same update multiple times.

The content of each update depends on the update type (Chat Message or Callback Query) and on the specific message type. Refer to the DTO section for more details.

Suggest a change
Last updated 22 September 2025