sendVideoNote
원형 동영상(video note)을 전송합니다.
반환값: 성공 시 반환값: Message.
매개변수
| 매개변수 | 타입 | 필수 | 설명 |
|---|---|---|---|
business_connection_id | String | 선택 | 비즈니스 연결 ID |
chat_id | Integer or String | 예 | 채팅 ID 또는 @username |
message_thread_id | Integer | 선택 | 포럼 토픽 ID |
direct_messages_topic_id | Integer | 선택 | 다이렉트 메시지 토픽 ID (Bot API 10.0) |
ephemeral_message_parameters | EphemeralMessageParameters | 선택 | EphemeralMessageParameters JSON 객체 — 한 사용자에게만 보이는 임시 메시지 (Bot API 10.3) |
video_note | InputFile or String | 예 | 원형 동영상 URL 또는 file_id |
duration | Integer | 선택 | 재생 시간(초) |
length | Integer | 선택 | 너비 및 높이 (원 지름) |
thumbnail | InputFile or String | 선택 | 썸네일 URL 또는 file_id |
disable_notification | Boolean | 선택 | 알림 없이 전송 |
protect_content | Boolean | 선택 | 콘텐츠 보호 |
allow_paid_broadcast | Boolean | 선택 | 유료 브로드캐스트 허용 |
message_effect_id | String | 선택 | 메시지 효과 ID |
suggested_post_parameters | SuggestedPostParameters | 선택 | SuggestedPostParameters JSON 객체 |
reply_parameters | ReplyParameters | 선택 | ReplyParameters JSON 객체 |
reply_markup | InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply | 선택 | JSON 객체: InlineKeyboardMarkup / ReplyKeyboardMarkup / ReplyKeyboardRemove / ForceReply |
요청 예제
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());
단계별 가이드: 텔레그램 봇 만들기: @BotFather로 생성하고 첫 메시지 보내기
관련 메서드
sendPhoto사진을 전송합니다.sendVideo동영상을 전송합니다.sendDocument문서를 전송합니다.sendAudio오디오를 전송합니다.sendAnimation애니메이션(GIF)을 전송합니다.sendSticker스티커를 전송합니다.sendVoice음성 메시지를 전송합니다.sendMediaGroup미디어 그룹(앨범)을 전송합니다.sendPaidMedia유료 미디어를 전송합니다 (Bot API 8.0+).sendDice주사위를 전송합니다.sendLivePhoto라이브 포토를 전송합니다 (사진 + 동영상, Bot API 10.0).