I am using the telegram bot API but I cant see anyway to download a filé that was sent to my bot. I get a hash of the file but dont know what to do with it. Is there any way
Yay! It's just added at September 18, 2015
You can use getFile(file_id)
. This function returns a File object containing file_path
. You can download the file through this address:
https://api.telegram.org/file/bot
As mentioned in Telegram Bot API Documentation, the File object will be valid for about one hour. You should call getFile
again to get a new File object if the old one expires.