Telegram Bot API
🌐 English

logOut

Category: Bot Info · Bot API 10.3 · Official documentation

Logs out from the cloud Bot API server.

Returns: On success, returns True.

Parameters

This method has no parameters — just call it with your bot token.

Example request

curl

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

Python

import requests

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

JavaScript

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

Step-by-step guide: How to Create a Telegram Bot: Step by Step with BotFather and Python