Telegram Bot API
🌐 Türkçe

setStickerSetThumbnail

Kategori: Çıkartmalar · Bot API 10.3 · Resmi dokümantasyon

Çıkartma paketinin küçük resmini ayarlar.

Dönüş değeri: Başarılı olduğunda True döndürür.

Parametreler

ParametreTürZorunluAçıklama
nameStringEvetÇıkartma paketi adı
user_idIntegerEvetKullanıcı ID'si
thumbnailInputFile or Stringİsteğe bağlıKüçük resim (InputFile veya file_id)
formatStringEvetBiçim: static, animated, video

Parametre açıklamaları kısa özetlerdir; tam metin için resmi dokümantasyona bakın.

Örnek istek

curl

curl -s -X POST "https://api.telegram.org/bot$TOKEN/setStickerSetThumbnail" \
  -H "Content-Type: application/json" \
  -d '{"name":"example_by_your_bot","user_id":123456789,"format":"static"}'

Python

import requests

TOKEN = "123456789:AAEexampleTokenReplaceWithYours"
resp = requests.post(
    f"https://api.telegram.org/bot{TOKEN}/setStickerSetThumbnail",
    json={
        "name": "example_by_your_bot",
        "user_id": 123456789,
        "format": "static"
    },
    timeout=30,
)
print(resp.json())

JavaScript

const TOKEN = "123456789:AAEexampleTokenReplaceWithYours";
const res = await fetch(`https://api.telegram.org/bot${TOKEN}/setStickerSetThumbnail`, {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "name": "example_by_your_bot",
    "user_id": 123456789,
    "format": "static"
  }),
});
console.log(await res.json());

Adım adım rehber: Telegram bot nasıl yapılır? BotFather ile adım adım bot oluşturma