Telegram Bot API
🌐 Tiếng Việt

getMe

Danh mục: Thông tin bot · Bot API 10.3 · Tài liệu chính thức

Trả về thông tin của bot.

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

Tham số

Phương thức này không có tham số — chỉ cần gọi nó với token của bot.

Ví dụ request

curl

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

Python

import requests

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

JavaScript

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

Hướng dẫn từng bước: Cách lấy token bot Telegram: tìm lại, kiểm tra bằng getMe và thu hồi khi bị lộ