getWebhookInfoПоддерживается
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.
Параметры
Метод не принимает параметров.
Пример запроса
curl
curl "https://api.staticgram.top/bot$TOKEN/getWebhookInfo"aiogram 3
from aiogram import Bot
from aiogram.client.session.aiohttp import AiohttpSession
from aiogram.client.telegram import TelegramAPIServer
session = AiohttpSession(api=TelegramAPIServer.from_base("https://api.staticgram.top"))
bot = Bot(TOKEN, session=session)
result = await bot.get_webhook_info()JavaScript
const res = await fetch(`https://api.staticgram.top/bot${TOKEN}/getWebhookInfo`);
const data = await res.json();Ответ (WebhookInfo)
JSON
{
"ok": true,
"result": {
"url": "...",
"has_custom_certificate": true,
"pending_update_count": 1
}
}