getWebhookInfo

Returns: WebhookInfo

class aiogram.methods.get_webhook_info.GetWebhookInfo(**extra_data: Any)[source]

Use this method to get current webhook status. Requires no parameters. On success, returns a aiogram.types.webhook_info.WebhookInfo object. If the bot is using aiogram.methods.get_updates.GetUpdates, will return an object with the url field empty.

Source: https://core.telegram.org/bots/api#getwebhookinfo

model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_post_init(context: Any, /) None

We need to both initialize private attributes and call the user-defined model_post_init method.

Usage

As bot method

result: WebhookInfo = await bot.get_webhook_info(...)

Method as object

Imports:

  • from aiogram.methods.get_webhook_info import GetWebhookInfo

  • alias: from aiogram.methods import GetWebhookInfo

With specific bot

result: WebhookInfo = await bot(GetWebhookInfo(...))