editMessageCaption
Chỉnh sửa chú thích của media.
Giá trị trả về: Nếu thành công, trả về Message or True.
Tham số
| Tham số | Kiểu | Bắt buộc | Mô tả |
|---|---|---|---|
business_connection_id | String | Tùy chọn | ID kết nối doanh nghiệp |
chat_id | Integer or String | Tùy chọn | ID chat |
message_id | Integer | Tùy chọn | ID tin nhắn |
inline_message_id | String | Tùy chọn | ID tin nhắn inline |
caption | String | Tùy chọn | Chú thích mới |
parse_mode | String | Tùy chọn | HTML, Markdown, MarkdownV2 |
caption_entities | Array of MessageEntity | Tùy chọn | Mảng JSON MessageEntity |
show_caption_above_media | Boolean | Tùy chọn | Hiển thị chú thích phía trên media |
reply_markup | InlineKeyboardMarkup | Tùy chọn | JSON: InlineKeyboardMarkup |
Ví dụ request
curl
curl -s "https://api.telegram.org/bot$TOKEN/editMessageCaption"
Python
import requests
TOKEN = "123456789:AAEexampleTokenReplaceWithYours"
resp = requests.get(f"https://api.telegram.org/bot{TOKEN}/editMessageCaption", timeout=30)
print(resp.json())
JavaScript
const TOKEN = "123456789:AAEexampleTokenReplaceWithYours";
const res = await fetch(`https://api.telegram.org/bot${TOKEN}/editMessageCaption`);
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.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.editMessageChecklistChỉnh sửa checklist.