messages
messages.getHistoryAttachments
Returns media files from the dialog or group chat.
To call this method, you can use:
• community access token (access rights required: messages)
Parameters
attachment_types
string
group_id
integer
group ID (for community messages with a user access token).
peer_id
integer
Peer ID.
For group chat:
2000000000 + chat ID
For community:
-community ID
cmid
positive
attachment_position
positive
offset
string
count
positive
Number of objects to return.
extended
checkbox
fields
string
Additional profile fields to return.
max_forwards_level
positive
message_video
checkbox
media_type
string
Type of media files to return:
- •photo;
- •video;
- •audio;
- •doc;
- •link.
start_from
string
Message ID to start return results from.
preserve_order
checkbox
reverse_sort
checkbox
photo_sizes
checkbox
1 — to return photo sizes in a
Result
Returns a list of ****, , Аудиозапись 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. string |
|---|---|
title | link title. string |
description | link description. string |
image_src | URL of the link preview image. string |
Error codes
927
Chat does not exist
995
Messenger degradation
Common errors may occur during execution