Developers » API methods » Messages » messages.getHistoryAttachments
Returns media files from the dialog or group chat.
This method can be called with a user token received in Standalone-app via Implicit Flow. Access rights required: messages.
This method can be called with a community token. Access rights required: messages.
peer_idPeer ID.

For group chat:
2000000000 + chat ID

For community:
-community ID

int (number), required parameter
media_typeType of media files to return:
  • photo;
  • video;
  • audio;
  • doc;
  • link.
string, default photo
start_fromMessage ID to start return results from.
countNumber of objects to return.
positive number, maximum value 200, default 30
photo_sizes1 to return photo sizes in a special format
flag, either 1 or 0
fieldsAdditional profile fields to return.
list of comma-separated words
group_idgroup ID (for community messages with a user access token).
positive number
flag, either 1 or 0
positive number, maximum value 45, default 45
Returns a list of photo, video, audio or doc objects depending on media_type parameter value and additional next_from field containing new offset value.

For media_type=link returns a list of objects:

url link URL.
title link title.
description link description.
image_src URL of the link preview image.
Global errors can occur while running. See their descriptions on this page.
Version historyShow all
messages.getHistoryAttachments method returns message_id field. User object has a new value of relationship status (8 "in a civil union").
messages.send and messages.sendSticker methods use random_id parameter instead guid. account.getPushSettings return peer_id field instead chat_id and user_id. account.setSilenceMode method use peer_id parameter instead chat_id and user_id. messages.getHistoryAttachments method return market items, posts and comments like link attachments.
Returns new fields for message attachments with link type: caption, is_external, product, application, rating and button.