Telegram Bot API
🌐 한국어

sendVideo

카테고리: 미디어 · Bot API 10.3 · 공식 문서

동영상을 전송합니다.

반환값: 성공 시 반환값: Message.

매개변수

매개변수타입필수설명
business_connection_idString선택비즈니스 연결 ID
chat_idInteger or String예채팅 ID 또는 @username
message_thread_idInteger선택포럼 토픽 ID
direct_messages_topic_idInteger선택다이렉트 메시지 토픽 ID (Bot API 10.0)
ephemeral_message_parametersEphemeralMessageParameters선택EphemeralMessageParameters JSON 객체 — 한 사용자에게만 보이는 임시 메시지 (Bot API 10.3)
videoInputFile or String예동영상 URL 또는 file_id
durationInteger선택재생 시간(초)
widthInteger선택동영상 너비
heightInteger선택동영상 높이
thumbnailInputFile or String선택썸네일 URL 또는 file_id
coverInputFile or String선택동영상 커버 (Bot API 10.0)
start_timestampInteger선택동영상 시작 타임스탬프 (Bot API 10.0)
captionString선택캡션 (0-1024)
parse_modeString선택HTML, Markdown, MarkdownV2
caption_entitiesArray of MessageEntity선택MessageEntity JSON 배열
show_caption_above_mediaBoolean선택동영상 위에 캡션 표시
has_spoilerBoolean선택콘텐츠 가리기 (스포일러)
supports_streamingBoolean선택스트리밍 지원
disable_notificationBoolean선택알림 없이 전송
protect_contentBoolean선택콘텐츠 보호
allow_paid_broadcastBoolean선택유료 브로드캐스트 허용
message_effect_idString선택메시지 효과 ID
suggested_post_parametersSuggestedPostParameters선택SuggestedPostParameters JSON 객체
reply_parametersReplyParameters선택ReplyParameters JSON 객체
reply_markupInlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply선택JSON 객체: InlineKeyboardMarkup / ReplyKeyboardMarkup / ReplyKeyboardRemove / ForceReply

매개변수 설명은 핵심만 간추린 요약입니다. 전체 설명은 공식 문서에서 확인할 수 있습니다.

요청 예제

curl

curl -s -X POST "https://api.telegram.org/bot$TOKEN/sendVideo" \
  -H "Content-Type: application/json" \
  -d '{"chat_id":123456789,"video":"https://example.com/video.mp4"}'

Python

import requests

TOKEN = "123456789:AAEexampleTokenReplaceWithYours"
resp = requests.post(
    f"https://api.telegram.org/bot{TOKEN}/sendVideo",
    json={
        "chat_id": 123456789,
        "video": "https://example.com/video.mp4"
    },
    timeout=30,
)
print(resp.json())

JavaScript

const TOKEN = "123456789:AAEexampleTokenReplaceWithYours";
const res = await fetch(`https://api.telegram.org/bot${TOKEN}/sendVideo`, {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "chat_id": 123456789,
    "video": "https://example.com/video.mp4"
  }),
});
console.log(await res.json());

단계별 가이드: 텔레그램 봇 만들기: @BotFather로 생성하고 첫 메시지 보내기