Telegram Bot API
🌐 Español

setChatStickerSet

Categoría: Chat · Bot API 10.3 · Documentación oficial

Establece un paquete de stickers para un supergrupo.

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

Parámetros

ParámetroTipoObligatorioDescripción
chat_idInteger or StringSíID del chat o @username
sticker_set_nameStringSíNombre del paquete de stickers

Las descripciones de los parámetros son resúmenes breves; consulta la documentación oficial para ver el texto completo.

Ejemplo de solicitud

curl

curl -s -X POST "https://api.telegram.org/bot$TOKEN/setChatStickerSet" \
  -H "Content-Type: application/json" \
  -d '{"chat_id":123456789,"sticker_set_name":"example"}'

Python

import requests

TOKEN = "123456789:AAEexampleTokenReplaceWithYours"
resp = requests.post(
    f"https://api.telegram.org/bot{TOKEN}/setChatStickerSet",
    json={
        "chat_id": 123456789,
        "sticker_set_name": "example"
    },
    timeout=30,
)
print(resp.json())

JavaScript

const TOKEN = "123456789:AAEexampleTokenReplaceWithYours";
const res = await fetch(`https://api.telegram.org/bot${TOKEN}/setChatStickerSet`, {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "chat_id": 123456789,
    "sticker_set_name": "example"
  }),
});
console.log(await res.json());

Guía paso a paso: Cómo crear un bot en Telegram paso a paso: de BotFather a tu primer mensaje