M
M
Mikhail Vasiltsev2019-02-26 13:52:12
API
Mikhail Vasiltsev, 2019-02-26 13:52:12

API VK. How to attach a YouTube video to a message when sent by a bot?

Greetings. When creating a training bot, VK encountered such a situation. With a certain logic of events, the bot sends people a link / links to a YouTube video in the format https://www.youtube.com/watch?v=id-video
At the same time, alas, the video is not attached in any way, although if you go to VK yourself and try to send a message to someone, when you enter a link to a YouTube video, it will immediately attach. On the screenshot, I outlined this situation:
5c7519227cd02728744127.jpeg
My bot at the moment just sends a link / list of links to the video.
Maybe there are some settings / parameters for the bot so that it still attaches the video? How to correctly generate a value for the attachment property? Haven't found it in the documentation yet.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
iBird Rose, 2019-02-26
@mihail430899

like it or not, but https://vk.com/dev/video.save will have to be used. Through the link parameter

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question