editMessageChecklist
Chỉnh sửa checklist.
Giá trị trả về: Nếu thành công, trả về Message.
Tham số
| Tham số | Kiểu | Bắt buộc | Mô tả |
|---|---|---|---|
business_connection_id | String | Có | ID kết nối doanh nghiệp |
chat_id | Integer or String | Có | ID chat |
message_id | Integer | Có | ID tin nhắn |
checklist | InputChecklist | Có | Đối tượng JSON InputChecklist |
reply_markup | InlineKeyboardMarkup | Tùy chọn | JSON: InlineKeyboardMarkup |
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
Phương thức liên quan
editMessageTextChỉnh sửa nội dung tin nhắn.editMessageCaptionChỉnh sửa chú thích của media.editMessageMediaChỉnh sửa media trong tin nhắn.editMessageReplyMarkupChỉnh sửa reply markup của tin nhắn.editMessageLiveLocationChỉnh sửa vị trí trực tiếp.stopMessageLiveLocationDừng chia sẻ vị trí trực tiếp.