Telegram Bot API
🌐 English

deleteWebhook

Category: Updates · Bot API 10.3 · Official documentation

Deletes a webhook.

Returns: On success, returns True.

Parameters

ParameterTypeRequiredDescription
drop_pending_updatesBooleanOptionalDrop pending updates

Parameter descriptions are concise summaries; see the official documentation for the full text.

Example 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());

Step-by-step guide: How to Set Up a Telegram Bot Webhook: setWebhook, Secret Token and Troubleshooting