Answer the question
In order to leave comments, you need to log in
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
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 v
and aсcess_token
.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question