问题
I am currently working on a Telegram Bot project which requires me to download Images send by users to the bot.
I followed the API documentation which says to use the getFile call to access the file_path. The file should then be found using the path (https://api.telegram.org/file/bot/)
Everything works until I try to access the file using the address above. It always returns 404. However not a json containing the 404 message, but a black screen in the browser and 404 in the page response.
Maybe I am missing something.
Help is greatly appreciated!
回答1:
I had the same issue and this was my error: i was using https://api.telegram.org/bot<token>/<file_path>
instead of https://api.telegram.org/file/bot<token>/<file_path>
来源:https://stackoverflow.com/questions/58669218/telegram-bot-api-file-download-path-returns-404