P
P
Pavel_White2020-02-09 23:06:16
PHP
Pavel_White, 2020-02-09 23:06:16

How to send video vk api messages.send php?

$request_params = array(
    'message' => $answer_text,
    'random_id' => rand(1, 999999),
    'user_id' => $user_id,
    'attachment' => 'video-189353548_456239010',
    'access_token' => $token,
    'v' => '5.103'
  );
  $get_params = http_build_query($request_params);
  file_get_contents("https://api.vk.com/method/messages.send?". $get_params);

Everything works great when there is a photo in the attachment...
When there is a video: 5e4064e8204f1146433543.jpeg

However, I checked it here (at the bottom of the page, the form for checking the method), and the video was sent....

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ilya, 2020-02-10
@llyadoctor

Perhaps fingers in the sky, but from whom is the video uploaded? Maybe VK is sensitive when the video is not uploaded on behalf of the community on which the bot is based

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question