messages.sendMultiMedia

Send an album or grouped media

updatesTooLong#e317af7e = Updates;
updateShortMessage#313bc7f8 flags:# out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true silent:flags.13?true id:int user_id:long message:string pts:int pts_count:int date:int fwd_from:flags.2?MessageFwdHeader via_bot_id:flags.11?long reply_to:flags.3?MessageReplyHeader entities:flags.7?Vector<MessageEntity> ttl_period:flags.25?int = Updates;
updateShortChatMessage#4d6deea5 flags:# out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true silent:flags.13?true id:int from_id:long chat_id:long message:string pts:int pts_count:int date:int fwd_from:flags.2?MessageFwdHeader via_bot_id:flags.11?long reply_to:flags.3?MessageReplyHeader entities:flags.7?Vector<MessageEntity> ttl_period:flags.25?int = Updates;
updateShort#78d4dec1 update:Update date:int = Updates;
updatesCombined#725b04c3 updates:Vector<Update> users:Vector<User> chats:Vector<Chat> date:int seq_start:int seq:int = Updates;
updates#74ae4240 updates:Vector<Update> users:Vector<User> chats:Vector<Chat> date:int seq:int = Updates;
updateShortSentMessage#9015e101 flags:# out:flags.1?true id:int pts:int pts_count:int date:int media:flags.9?MessageMedia entities:flags.7?Vector<MessageEntity> ttl_period:flags.25?int = Updates;
---functions---
messages.sendMultiMedia#f803138f flags:# silent:flags.5?true background:flags.6?true clear_draft:flags.7?true noforwards:flags.14?true peer:InputPeer reply_to_msg_id:flags.0?int multi_media:Vector<InputSingleMedia> schedule_date:flags.10?int send_as:flags.13?InputPeer = Updates;

Parameters

Name Type Description
flags # Flags, see TL conditional fields
silent flags.5?true Whether to send the album silently (no notification triggered)
background flags.6?true Send in background?
clear_draft flags.7?true Whether to clear drafts
noforwards flags.14?true Only for bots, disallows forwarding and saving of the messages, even if the destination chat doesn't have content protection enabled
peer InputPeer The destination chat
reply_to_msg_id flags.0?int The message to reply to
multi_media Vector<InputSingleMedia> The medias to send
schedule_date flags.10?int Scheduled message date for scheduled messages
send_as flags.13?InputPeer Send this message as the specified peer

Result

Updates

Possible errors

Code Type Description
400 CHANNEL_PRIVATE You haven't joined this channel/supergroup.
400 CHAT_ADMIN_REQUIRED You must be an admin in this chat to do this.
403 CHAT_WRITE_FORBIDDEN You can't write in this chat.
400 MEDIA_CAPTION_TOO_LONG The caption is too long.
400 MEDIA_EMPTY The provided media object is invalid.
400 MEDIA_INVALID Media invalid.
400 MULTI_MEDIA_TOO_LONG Too many media files for album.
400 PEER_ID_INVALID The provided peer id is invalid.
500 RANDOM_ID_DUPLICATE You provided a random ID that was already used.
400 RANDOM_ID_EMPTY Random ID empty.
400 SCHEDULE_DATE_TOO_LATE You can't schedule a message this far in the future.
400 SCHEDULE_TOO_MUCH There are too many scheduled messages.
420 SLOWMODE_WAIT_%d Slowmode is enabled in this chat: wait %d seconds before sending another message to this chat.

Bots can use this method

Related pages

Message drafts

How to handle message drafts

Uploading and Downloading Files

How to transfer large data batches correctly.