core icon indicating copy to clipboard operation
core copied to clipboard

sendDocument doesn't have option to specify only file_id as String to send a file that exists on the Telegram servers

Open nightrider77 opened this issue 2 years ago • 2 comments

According to Telegram's API, https://core.telegram.org/bots/api#senddocument sendDocument method can accept document or file_id as a reference to a file which already exists on their servers. Current version of php-telegram-bot doesn't support to pass file_id to this method, only path to local document.

nightrider77 avatar Nov 30 '23 11:11 nightrider77

Hello

I can confirm that the bot supports file ID as well since i have it in use as well. How did you test it if i may ask ?

Hitmare avatar Jan 02 '24 21:01 Hitmare

@nightrider77 Note that the file ID is locked to the bot that created it in the first place, so you can use the file ID from a file uploaded with a different bot. (As far as I recall)

noplanman avatar Jan 03 '24 23:01 noplanman