Telegram Bot API
🌐 Türkçe

sendChecklist

Kategori: Mesajlar · Bot API 10.3 · Resmi dokümantasyon

İşletme hesabı adına kontrol listesi gönderir.

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

Parametreler

ParametreTürZorunluAçıklama
business_connection_idStringEvetİşletme bağlantısı ID'si
chat_idInteger or StringEvetSohbet ID'si veya @username
checklistInputChecklistEvetJSON InputChecklist nesnesi
disable_notificationBooleanİsteğe bağlıSessiz gönder
protect_contentBooleanİsteğe bağlıİçeriği koru
message_effect_idStringİsteğe bağlıMesaj efekti ID'si
reply_parametersReplyParametersİsteğe bağlıJSON ReplyParameters nesnesi
reply_markupInlineKeyboardMarkupİsteğe bağlıJSON: InlineKeyboardMarkup

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/sendChecklist" \
  -H "Content-Type: application/json" \
  -d '{
  "business_connection_id": "BUSINESS_CONNECTION_ID",
  "chat_id": 123456789,
  "checklist": {
    "title": "Today",
    "tasks": [
      {
        "id": 1,
        "text": "Write code"
      }
    ]
  }
}'

Python

import requests

TOKEN = "123456789:AAEexampleTokenReplaceWithYours"
resp = requests.post(
    f"https://api.telegram.org/bot{TOKEN}/sendChecklist",
    json={
        "business_connection_id": "BUSINESS_CONNECTION_ID",
        "chat_id": 123456789,
        "checklist": {
            "title": "Today",
            "tasks": [
                {
                    "id": 1,
                    "text": "Write code"
                }
            ]
        }
    },
    timeout=30,
)
print(resp.json())

JavaScript

const TOKEN = "123456789:AAEexampleTokenReplaceWithYours";
const res = await fetch(`https://api.telegram.org/bot${TOKEN}/sendChecklist`, {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "business_connection_id": "BUSINESS_CONNECTION_ID",
    "chat_id": 123456789,
    "checklist": {
      "title": "Today",
      "tasks": [
        {
          "id": 1,
          "text": "Write code"
        }
      ]
    }
  }),
});
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