电报漫游器怪异错误:错误的请求:错误的文件标识符/指定的HTTP URL [英] Telegram bot weird error : Bad Request: wrong file identifier/HTTP URL specified
本文介绍了电报漫游器怪异错误:错误的请求:错误的文件标识符/指定的HTTP URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用漫游器向电报频道发送消息.
I am sending message to telegram channel using bot.
使用webhook方法.
With using webhook method.
我正在通过链接发送file_id.我从频道发布中获得了file_id.
I'm sending file_id via the link. I got the file_id from a channel post.
对于某些文件,例如GIF&视频格式(MP4),
For some files like GIF & video format (MP4),
当我使用此代码时:
$url = 'https://api.telegram.org/bot'.token.'/sendVideo?chat_id='.uid."&video=".$file."&caption="
.urlencode($caption);
file_get_contents($url);
我得到这样的错误:
{"ok":false,"error_code":400,"description":"Bad Request: wrong file identifier/HTTP URL specified"}
我真的不知道为什么我得到这个, 就像这是随机的错误,因为我猜代码没有任何依赖.
I really don't know why i get this, It's like this is random for errors, Because the code is depended to nothing i guess.
我使用从某个频道的帖子中获取的file_id.
I use file_id that i've got from a channel's post.
该错误的原因是什么? 错误的请求:错误的文件标识符/指定的HTTP URL
What is the reason of that error? Bad Request: wrong file identifier/HTTP URL specified
- 我已经搜索了所有相关主题,但找不到很好的信息.
推荐答案
文档:
- 通过file_id重新发送时,无法更改文件类型.即视频不能作为照片发送,照片不能作为文档发送,等等.
- 无法重新发送缩略图.
- 通过file_id重新发送照片将发送其所有大小.
- file_id对于每个单独的漫游器都是唯一的,无法传输 从一个机器人到另一个机器人.
- It is not possible to change the file type when resending by file_id. i.e. a video can't be sent as a photo, a photo can't be sent as a document, etc.
- It is not possible to resend thumbnails.
- Resending a photo by file_id will send all of its sizes.
- file_id is unique for each individual bot and can't be transferred from one bot to another.
这篇关于电报漫游器怪异错误:错误的请求:错误的文件标识符/指定的HTTP URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文