StaticGramBot API

deleteWebhookПоддерживается

Use this method to remove webhook integration if you decide to switch back to getUpdates. Returns True on success.

Параметры

drop_pending_updatesBooleanнеобязательный
Pass True to drop all pending updates

Пример запроса

curl
curl "https://api.staticgram.top/bot$TOKEN/deleteWebhook"
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.delete_webhook()
JavaScript
const res = await fetch(`https://api.staticgram.top/bot${TOKEN}/deleteWebhook`);
const data = await res.json();

Ответ (True)

JSON
{
  "ok": true,
  "result": true
}

Описания методов и типов взяты из официальной документации Telegram Bot API (Bot API 10.3). Адрес API: https://api.staticgram.top