Telegram Bot API
🌐 Español

getMe

Categoría: Info del bot · Bot API 10.3 · Documentación oficial

Devuelve información del bot.

Devuelve: Si la llamada tiene éxito, devuelve User.

Parámetros

Este método no tiene parámetros: solo llámalo con el token de tu bot.

Ejemplo de solicitud

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

Guía paso a paso: Cómo obtener el token de un bot de Telegram (y qué hacer si se filtra)