Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why the file id, in telegram bot, not work after some days?

I am using telegram API and create php telegram bot. For sending video file with sendVideo method, use file_id like BAADBAADbwADhd7gCEpUooz4V5Q1Ag. But after some days this file_id not worked and I have to upload this video file again. What is the problem?

like image 679
amin roshani Avatar asked Nov 14 '25 15:11

amin roshani


1 Answers

as you can read in this link:

Can I count on file_ids to be persistent?

For the moment, file_ids for your bot's outgoing files may be recycled after several thousand files have been sent. This may be changed in the future. Inbound file_ids can be treated as persistent.

so if you send a file from your server to telegram user (over the bot), the returned file_id can't be permanent. you can forward the file from user to bot and save file_id instead of that.

like image 194
علیرضا Avatar answered Nov 17 '25 07:11

علیرضا



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!