2019-11-16 22:32:05 +02:00
# sendMediaGroup
## Description
Use this method to send a group of photos or videos as an album. On success, an array of the sent Messages is returned.
## Arguments
| Name | Type | Description |
| - | - | - |
| `chat_id` | `#!python3 Union[int, str]` | Unique identifier for the target chat or username of the target channel (in the format @channelusername ) |
2020-05-02 23:01:32 +03:00
| `media` | `#!python3 List[Union[InputMediaPhoto, InputMediaVideo]]` | A JSON-serialized array describing photos and videos to be sent, must include 2-10 items |
2019-11-16 22:32:05 +02:00
| `disable_notification` | `#!python3 Optional[bool]` | Optional. Sends the messages silently. Users will receive a notification with no sound. |
| `reply_to_message_id` | `#!python3 Optional[int]` | Optional. If the messages are a reply, ID of the original message |
## Response
Type: `#!python3 List[Message]`
Description: On success, an array of the sent Messages is returned.
## Usage
2020-04-11 20:15:03 +03:00
### As bot method
2019-11-16 22:32:05 +02:00
```python3
result: List[Message] = await bot.send_media_group(...)
```
### Method as object
Imports:
2019-12-11 16:52:21 +02:00
- `from aiogram.methods import SendMediaGroup`
- `from aiogram.api.methods import SendMediaGroup`
- `from aiogram.api.methods.send_media_group import SendMediaGroup`
2019-11-16 22:32:05 +02:00
2020-01-11 22:59:14 +02:00
#### In handlers with current bot
2019-11-16 22:32:05 +02:00
```python3
2020-01-11 22:59:14 +02:00
result: List[Message] = await SendMediaGroup(...)
2019-11-16 22:32:05 +02:00
```
#### With specific bot
```python3
2020-01-11 22:59:14 +02:00
result: List[Message] = await bot(SendMediaGroup(...))
2019-11-16 22:32:05 +02:00
```
2020-01-11 22:59:14 +02:00
#### As reply into Webhook in handler
2019-11-16 22:32:05 +02:00
```python3
2020-01-11 22:59:14 +02:00
return SendMediaGroup(...)
2019-11-16 22:32:05 +02:00
```
## Related pages:
- [Official documentation ](https://core.telegram.org/bots/api#sendmediagroup )
- [aiogram.types.InputMediaPhoto ](../types/input_media_photo.md )
- [aiogram.types.InputMediaVideo ](../types/input_media_video.md )
- [aiogram.types.Message ](../types/message.md )