Telegram bot weird error : Bad Request: wrong file identifier/HTTP URL specified

后端 未结 6 1635
刺人心
刺人心 2021-01-07 22:25

I am sending message to telegram channel using bot.

With using webhook method.

I\'m sending file_id via the link. I got the file_id from a channel post.

6条回答
  •  旧巷少年郎
    2021-01-07 23:15

    If you forward a file (photo, audio, ...) to a bot, you will get a valid file_id for this file (for your bot). It should be safe to use this id to send then file, but it seems it dosen't work for some files (audio, video, ...)!! (May be a Telegram API bug).

    You can download and reupload the file to your bot, to get a new file_id and this id will work.

提交回复
热议问题