mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-08 17:13:56 +00:00
1 KiB
1 KiB
getWebhookInfo
Description
Use this method to get current webhook status. Requires no parameters. On success, returns a WebhookInfo object. If the bot is using getUpdates, will return an object with the url field empty.
Response
Type: #!python3 WebhookInfo
Description: On success, returns a WebhookInfo object. If the bot is using getUpdates, will return an object with the url field empty.
Usage
As bot method bot
result: WebhookInfo = await bot.get_webhook_info(...)
Method as object
Imports:
from aiogram.methods import GetWebhookInfofrom aiogram.api.methods import GetWebhookInfofrom aiogram.api.methods.get_webhook_info import GetWebhookInfo
In handlers with current bot
result: WebhookInfo = await GetWebhookInfo(...)
With specific bot
result: WebhookInfo = await bot(GetWebhookInfo(...))