Telegram Bot API
🌐 Tiếng Việt

editMessageChecklist

Danh mục: Chỉnh sửa · Bot API 10.3 · Tài liệu chính thức

Chỉnh sửa checklist.

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

Tham số

Tham sốKiểuBắt buộcMô tả
business_connection_idStringCóID kết nối doanh nghiệp
chat_idInteger or StringCóID chat
message_idIntegerCóID tin nhắn
checklistInputChecklistCóĐối tượng JSON InputChecklist
reply_markupInlineKeyboardMarkupTùy chọnJSON: InlineKeyboardMarkup

Mô tả tham số chỉ là bản tóm tắt ngắn gọn; xem tài liệu chính thức để đọc toàn văn.

Ví dụ request

curl

curl -s -X POST "https://api.telegram.org/bot$TOKEN/editMessageChecklist" \
  -H "Content-Type: application/json" \
  -d '{
  "business_connection_id": "BUSINESS_CONNECTION_ID",
  "chat_id": 123456789,
  "message_id": 42,
  "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}/editMessageChecklist",
    json={
        "business_connection_id": "BUSINESS_CONNECTION_ID",
        "chat_id": 123456789,
        "message_id": 42,
        "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}/editMessageChecklist`, {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "business_connection_id": "BUSINESS_CONNECTION_ID",
    "chat_id": 123456789,
    "message_id": 42,
    "checklist": {
      "title": "Today",
      "tasks": [
        {
          "id": 1,
          "text": "Write code"
        }
      ]
    }
  }),
});
console.log(await res.json());

Hướng dẫn từng bước: Cách tạo bot Telegram từ A đến Z: BotFather, token và tin nhắn đầu tiên