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.
For some files like GIF & 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 such this error :
{"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.
I use file_id that i've got from a channel's post.
What is the reason of that error? Bad Request: wrong file identifier/HTTP URL specified
There are many possible reasons for this as mentioned in the documentation: