Answer the question
In order to leave comments, you need to log in
How to send video via file id?
Hey
function sendVideoNote($chatId){
global $website;
$bot_url = $website.'/';
$url2 = $bot_url . "sendVideoNote";
$post_fields = array('chat_id' => $chatId, 'video_note' =>'AAMCBAADGQMAARnnbmDEy6q-2-_TnizJISOESE6pPqddAALRAgACb6gkUnLYVG5EGuIWkQHqMF0AAwEAB20AA79YAAIfBA');
$ch2 = curl_init();
curl_setopt($ch2, CURLOPT_HTTPHEADER, array( "Content-Type:multipart/form-data" ));
curl_setopt($ch2, CURLOPT_URL, $url2);
curl_setopt($ch2, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch2, CURLOPT_POSTFIELDS, $post_fields);
$output = curl_exec($ch2);
$output = json_decode($output, true);
print_r($output);
}
Answer the question
In order to leave comments, you need to log in
Apparently, the server does not recognize your file type and rejects it.
You need to understand the API. What files are accepted by the server (formats, extensions), are there any restrictions on the file size. Perhaps, when sending data, you need to set some headers.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question