Telegram Bot API File Download Path Returns 404

吃可爱长大的小学妹 提交于 2021-01-28 07:22:25

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!