Telegram Bot API
🌐 Tiếng Việt

deleteWebhook

Danh mục: Cập nhật · Bot API 10.3 · Tài liệu chính thức

Xóa webhook.

Giá trị trả về: Nếu thành công, trả về True.

Tham số

Tham sốKiểuBắt buộcMô tả
drop_pending_updatesBooleanTùy chọnBỏ qua các cập nhật đang chờ

Mô tả tham số chỉ là bản tóm tắt ngắn gọn; xem tài liệu chính thức để đọc toàn văn.

Ví dụ request

curl

curl -s "https://api.telegram.org/bot$TOKEN/deleteWebhook"

Python

import requests

TOKEN = "123456789:AAEexampleTokenReplaceWithYours"
resp = requests.get(f"https://api.telegram.org/bot{TOKEN}/deleteWebhook", timeout=30)
print(resp.json())

JavaScript

const TOKEN = "123456789:AAEexampleTokenReplaceWithYours";
const res = await fetch(`https://api.telegram.org/bot${TOKEN}/deleteWebhook`);
console.log(await res.json());

Hướng dẫn từng bước: Webhook Telegram bot: cài setWebhook, bảo mật bằng secret_token và dùng với n8n