Tool

Send media by url or id

Telegram Bot API's send-media-by-url-or-id tool enables seamless sending of various media types like documents, photos, videos, and audio directly to Telegram chats using file IDs or HTTP URLs. It simplifies media delivery in Telegram bots while supporting extensive customization options.

telegram_bot_api

Features

  • Supports sending multiple media types: Document, Photo, Audio, Video, Video Note, Voice, and Sticker.
  • Allows sending media via HTTP URL or existing Telegram file ID for flexibility.
  • Supports adding captions to media for contextual information.
  • Includes options to send messages silently without notifications or with notifications.
  • Enables advanced interaction with reply_markup for inline keyboards, custom keyboards, and force replies.

Benefits

  • Streamlines media sharing within Telegram bots for enhanced user engagement.
  • Reduces development complexity by handling file transfers with simple parameters.
  • Provides flexibility in targeting chats by accepting chat IDs or usernames.
  • Improves user experience with options like silent messages and interactive keyboards.
  • Boosts communication capabilities with support for diverse media formats and message customization.

Description

Sends a file (document, photo, video, audio, ...) by HTTP URL or by ID that exists on the Telegram servers. See the docs for more information

Parameters

7 parameters

NameTypeDescription
chatIdrequiredstring

Enter the unique identifier for the target chat (e.g. 1035597319) or username of the target public chat (in the format @channelusername or @supergroupusername). For example, if the group's public link is t.me/mygroup, the username is @mygroup.

captionstring

Enter the caption.

mediaTyperequiredenum

Select the media type.

mediarequiredstring

Pass a file_id to send a file that exists on the Telegram servers or pass an HTTP URL for Telegram to get a file from the Internet. File must meet Telegram's requirements for MIME type and size.

disable_notificationboolean

Choose if to send the message silently. iOS users will not receive a notification, Android users will receive a notification with no sound.

reply_to_message_idstring

Enter the ID of the original message.

reply_markupstring

Enter additional interface options that are a JSON-serialized object including an inline keyboard, a custom reply keyboard, instructions to remove the reply keyboard or instructions to force a reply from the user, e.g. {"inline_keyboard":[[{"text":"Some button text 2","url":"https://botpress.org"}]]} or {"keyboard":[["Yes","No"],["Maybe"]]}. Note: keyboard cannot be used with channels. See the docs for more information.

Try Needle today

Streamline AI productivity at your company today

Join thousands of people who have transformed their workflows.

Agentic workflowsAutomations, meet AI agents
AI SearchAll your data, searchable
Chat widgetsDrop-in widget for your website
Developer APIMake your app talk to Needle
    Needle LogoNeedle
    Like many websites, we use cookies to enhance your experience, analyze site traffic and deliver personalized content while you are here. By clicking "Accept", you are giving us your consent to use cookies in this way. Read our more on our cookie policy .