I am sending a message to a telegram using a bot.
Using the webhook method.
I am sending file_id by reference. I got file_id from the channel message.
For some files, such as GIF and video format (MP4),
when i use this code:
$url = 'https://api.telegram.org/bot'.token.'/sendVideo?chat_id='.uid."&video=".$file."&caption=" .urlencode($caption); file_get_contents($url);
I get this error:
{"ok":false,"error_code":400,"description":"Bad Request: wrong file identifier/HTTP URL specified"}
I really don't know why I understand this. It seems like an accident for errors, because the code depends on what I think.
I am using file_id, which I have from the channel message.
What is the reason for this error? Invalid request: invalid file id / specified HTTP url
- I searched all related topics, I did not find any good information.
source share