Telegram Bot API
🌐 فارسی

sendVideoNote

دسته‌بندی: رسانه · Bot API 10.3 · مستندات رسمی

پیام ویدیویی (ویدیوی دایره‌ای) ارسال می‌کند.

مقدار بازگشتی: در صورت موفقیت، Message برمی‌گرداند.

پارامترها

پارامترنوعالزامیتوضیحات
business_connection_idStringاختیاریشناسه اتصال تجاری
chat_idInteger or Stringبلهشناسه چت یا @username
message_thread_idIntegerاختیاریشناسه تاپیک انجمن
direct_messages_topic_idIntegerاختیاریشناسه تاپیک پیام‌های مستقیم (Bot API 10.0)
ephemeral_message_parametersEphemeralMessageParametersاختیاریآبجکت JSON از نوع EphemeralMessageParameters — پیام موقتی که فقط برای یک کاربر نمایش داده می‌شود (Bot API 10.3)
video_noteInputFile or Stringبلهپیام ویدیویی (URL یا file_id)
durationIntegerاختیاریمدت به ثانیه
lengthIntegerاختیاریعرض و ارتفاع (قطر دایره)
thumbnailInputFile or Stringاختیاریتصویر بندانگشتی (URL یا file_id)
disable_notificationBooleanاختیاریارسال بی‌صدا
protect_contentBooleanاختیاریمحافظت از محتوا
allow_paid_broadcastBooleanاختیاریاجازه ارسال انبوه پولی
message_effect_idStringاختیاریشناسه افکت پیام
suggested_post_parametersSuggestedPostParametersاختیاریآبجکت JSON از نوع SuggestedPostParameters
reply_parametersReplyParametersاختیاریآبجکت JSON از نوع ReplyParameters
reply_markupInlineKeyboardMarkup 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 تا اولین پیام با Python