sendVideoNote
Mengirim video note (video bulat).
Nilai kembalian: Jika berhasil, mengembalikan Message.
Parameter
| Parameter | Tipe | Wajib | Deskripsi |
|---|---|---|---|
business_connection_id | String | Opsional | ID koneksi bisnis |
chat_id | Integer or String | Ya | ID chat atau @username |
message_thread_id | Integer | Opsional | ID topik forum |
direct_messages_topic_id | Integer | Opsional | ID topik pesan langsung (Bot API 10.0) |
ephemeral_message_parameters | EphemeralMessageParameters | Opsional | Objek JSON EphemeralMessageParameters — pesan efemeral yang hanya terlihat oleh satu pengguna (Bot API 10.3) |
video_note | InputFile or String | Ya | URL atau file_id video note |
duration | Integer | Opsional | Durasi dalam detik |
length | Integer | Opsional | Lebar dan tinggi (diameter lingkaran) |
thumbnail | InputFile or String | Opsional | URL atau file_id thumbnail |
disable_notification | Boolean | Opsional | Kirim tanpa suara |
protect_content | Boolean | Opsional | Lindungi konten |
allow_paid_broadcast | Boolean | Opsional | Izinkan siaran berbayar |
message_effect_id | String | Opsional | ID efek pesan |
suggested_post_parameters | SuggestedPostParameters | Opsional | Objek JSON SuggestedPostParameters |
reply_parameters | ReplyParameters | Opsional | Objek JSON ReplyParameters |
reply_markup | InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply | Opsional | Objek JSON: InlineKeyboardMarkup / ReplyKeyboardMarkup / ReplyKeyboardRemove / ForceReply |
Contoh permintaan
curl
curl -s -X POST "https://api.telegram.org/bot$TOKEN/sendVideoNote" \
-H "Content-Type: application/json" \
-d '{"chat_id":123456789,"video_note":"FILE_ID"}'
Python
import requests
TOKEN = "123456789:AAEexampleTokenReplaceWithYours"
resp = requests.post(
f"https://api.telegram.org/bot{TOKEN}/sendVideoNote",
json={
"chat_id": 123456789,
"video_note": "FILE_ID"
},
timeout=30,
)
print(resp.json())
JavaScript
const TOKEN = "123456789:AAEexampleTokenReplaceWithYours";
const res = await fetch(`https://api.telegram.org/bot${TOKEN}/sendVideoNote`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"chat_id": 123456789,
"video_note": "FILE_ID"
}),
});
console.log(await res.json());
Panduan langkah demi langkah: Cara Membuat Bot Telegram: dari BotFather sampai Pesan Pertama
Metode terkait
sendPhotoMengirim foto.sendVideoMengirim video.sendDocumentMengirim dokumen.sendAudioMengirim audio.sendAnimationMengirim animasi (GIF).sendStickerMengirim stiker.sendVoiceMengirim pesan suara.sendMediaGroupMengirim grup media (album).sendPaidMediaMengirim media berbayar (Bot API 8.0+).sendDiceMengirim dadu.sendLivePhotoMengirim live photo (foto + video, Bot API 10.0).