Skip to content

sendVideo

Sahri Riza Umami edited this page Jun 22, 2018 · 3 revisions

Send a video message.

sendVideo(chat_id, reply_to_message_id, video, caption, parse_mode, added_sticker_file_ids, duration, width, height, ttl, thumbnail, thumb_width, thumb_height, disable_notification, from_background, reply_markup)
Field Type Description
chat_id int53 Chat to send message.
reply_to_message_id int53 Identifier of a message to reply.
video inputFile Video to be sent.
caption string Video caption; 0-200 characters.
parse_mode string Text parse mode.
added_sticker_file_ids vector File identifiers of the stickers added to the video, if applicable.
duration int32 Duration of the video, in seconds.
width int32 Video width.
height inte32 Video height.
ttl int32 Video TTL (Time To Live), in seconds (0-60). A non-zero TTL can be specified only in private chats.
thumbnail inputFile Video thumbnail, if available. Sending thumbnails by file_id is currently not supported.
thumb_width int32 Thumbnail width, usually shouldn't exceed 90. Use 0 if unknown.
`thumb_height int32 Thumbnail height, usually shouldn't exceed 90. Use 0 if unknown.
disable_notification Bool Pass true, to disable notification about the message, doesn't works in secret chats.
from_background Bool Pass true, if the message is sent from background.
reply_markup ReplyMarkup Bots only. Markup for replying to message.

Example

  • Send a video message into chat 1234567890 by video's remote id, and add BOLD TEST as its caption..

    sendVideo(1234567890, 16039018496, 'BAADBQADAwADZZlyAy09I41TVxllAg', '`BOLD` _TEST_', 'md')

    Response:

    {
      ["@type"] = "message",
      author_signature = "",
      can_be_deleted_for_all_users = true,
      can_be_deleted_only_for_self = false,
      can_be_edited = false,
      can_be_forwarded = true,
      chat_id = "-1234567890",
      contains_unread_mention = false,
      content = {
        ["@type"] = "messageVideo",
        caption = {
          ["@type"] = "formattedText",
          entities = {
            {
              ["@type"] = "textEntity",
              length = 4,
              offset = 0,
              type = {
                ["@type"] = "textEntityTypeCode"
              }
            },
            {
              ["@type"] = "textEntity",
              length = 4,
              offset = 5,
              type = {
                ["@type"] = "textEntityTypeItalic"
              }
            }
          },
          text = "BOLD TEST"
        },
        is_secret = false,
        video = {
          ["@type"] = "video",
          duration = 228,
          file_name = "",
          has_stickers = false,
          height = 640,
          mime_type = "video/mp4",
          supports_streaming = true,
          thumbnail = {
            ["@type"] = "photoSize",
            height = 90,
            photo = {
              ["@type"] = "file",
              expected_size = 1479,
              id = 9,
              ["local"] = {
                ["@type"] = "localFile",
                can_be_deleted = false,
                can_be_downloaded = true,
                downloaded_prefix_size = 0,
                downloaded_size = 0,
                is_downloading_active = false,
                is_downloading_completed = false,
                path = ""
              },
              remote = {
                ["@type"] = "remoteFile",
                id = "AAQFABNAA68yAATS_ix8S0l1MmQUAAIC",
                is_uploading_active = false,
                is_uploading_completed = true,
                uploaded_size = 1479
              },
              size = 1479
            },
            type = "s",
            width = 50
          },
          video = {
            ["@type"] = "file",
            expected_size = 8071931,
            id = 10,
            ["local"] = {
              ["@type"] = "localFile",
              can_be_deleted = false,
              can_be_downloaded = true,
              downloaded_prefix_size = 0,
              downloaded_size = 0,
              is_downloading_active = false,
              is_downloading_completed = false,
              path = ""
            },
            remote = {
              ["@type"] = "remoteFile",
              id = "BAADBQADAwADZZlyAy09I41TVxllAg",
              is_uploading_active = false,
              is_uploading_completed = true,
              uploaded_size = 8071931
            },
            size = 8071931
          },
          width = 359
        }
      },
      date = 1529639843,
      edit_date = 0,
      id = "16039018505",
      is_channel_post = false,
      is_outgoing = true,
      media_album_id = "0",
      reply_to_message_id = "16039018496",
      sender_user_id = 13377331,
      sending_state = {
        ["@type"] = "messageSendingStatePending"
      },
      ttl = 0,
      ttl_expires_in = 0,
      via_bot_user_id = 0,
      views = 0
    }

Frequently Asked Questions
The Functions

Clone this wiki locally