Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
nightrider77 opened this issue Nov 30, 2023 · 2 comments

Comments

@nightrider77
Copy link

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.

@Hitmare
Copy link
Collaborator

Hitmare commented Jan 2, 2024

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 ?

@noplanman
Copy link
Member

@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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants