G
G
German Shestak2018-09-14 22:11:43
In contact with
German Shestak, 2018-09-14 22:11:43

How to determine the url of an image in VK?

Good day. Another question from me about vk api.
How to determine the url of the attached image?
message.attachments returns: skrinshoter.ru/s/140918/iHxq9IEi
What to do?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Sokolov, 2018-09-15
@ilovetwilight

the API method returns not a link, but a photo ID: "188241464_456240492". Separated by an underline is the id of the photo and the owner.
To get a link to a photo, you need to call the photos.getById() method with parameters photos="188241464_456240492"and mandatory standard vand aсcess_token.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question