The vkontakte documentation says:

Some videos, the identifiers of which can be obtained through the API, are closed by privacy and will not be received. In this case, use the access_key access key in its identifier.

What way to get this access_key?

In the documentation I can not find such information.

  • So where it is written, there is a link to this access_token. Those. get it when you get a list of videos, there's even an example - BOPOH
  • @RAVON, some work, but some videos do not work as required by access_key (I think so). Of course I tried to get a list, where do you see access_key there, no there? Somewhere in the forum I read that for a photo, in order to get access_key you need to make a request in photos.getById, but there is no such method in the video. - bemulima
  • It will be easier if you create a working example, for example, as in this question , because at the docks they write that everything is simple: When receiving objects, direct access to which may not be, for example, photos or videos in the news, the access_key field comes along with the objects, which must be transmitted when receiving these objects directly or when committing actions to them T. e. access_key for such videos should come when you request a list of videos (you learned from somewhere about this identifier) - BOPOH
  • And, by the way, the video object contains access_token only if the version is api 5+, if the version is lower, then this field does not come - BOPOH

1 answer 1

Access_key can be obtained using the newsfeed.get method in the parameters by specifying filters = post and count = 1 . The response will be in addition to information about the post, access_key .

Sample answer:

  { "response": { "items": [ { "type": "post", "source_id": -57846937, "date": 1467650412, "post_id": 2809380, "post_type": "post", "text": "", "attachment": { "type": "photo", "photo": { "pid": 418453269, "aid": -7, "owner_id": -57846937, "user_id": 100, "src": "http://cs7005.vk.me/v7005482/2a266/ykQqTloRWy8.jpg", "src_big": "http://cs7005.vk.me/v7005482/2a267/2O00C6MUGxc.jpg", "src_small": "http://cs7005.vk.me/v7005482/2a265/Aq7yK_-gQ_U.jpg", "width": 480, "height": 423, "text": "", "created": 1467648178, "post_id": 2809380, "access_key": "18d3696d47dd4867a3" <== KEY } }, // Остальной код }