S
S
seeker_through_life2021-09-11 19:44:37
Android
seeker_through_life, 2021-09-11 19:44:37

Why is the video from vk api not coming?

I registered the standalone application in VK. The goal is to show video from VK in your Android application using the ExoPlayer library.
I make a request

https://api.vk.com/method/video.get?owner_id=-<owner_id>&v=5.73&access_token=<my_service_token>&videos=-<video_id>


But in response comes:
{
    "response": {
        "count": 1,
        "items": []
    }
}


those. items is empty even though the video exists and is public. What's wrong? And in general, is it really possible to show public videos from VK in a mobile application?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Evgeny Palych, 2021-09-11
@xzKakoyLogin

When receiving objects that may not be directly accessible, for example, photos or videos in the news, the access_key field comes along with the objects, which must be passed when receiving these objects directly or when performing actions with them

access_key must be added to the string object id via an underscore character:
123456_654312_6d103522bc13b790c5

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question