Upload a media file associated with an imported chat, click here for more info ».
Method schema is available as of layer 123. Switch »
| Name | Type | Description |
|---|---|---|
| peer | InputPeer | The Telegram chat where the media will be imported |
| import_id | long | Identifier of a history import session, returned by messages.initHistoryImport |
| file_name | string | File name |
| media | InputMedia | Media metadata |
| Code | Type | Description |
|---|---|---|
| 400 | CHAT_ADMIN_REQUIRED | You must be an admin in this chat to do this. |
| 400 | IMPORT_ID_INVALID | The specified import ID is invalid. |
| 400 | MEDIA_INVALID | Media invalid. |
Telegram allows importing messages and media from foreign chat apps.
Import chat history from a foreign chat app into a specific Telegram chat, click here for more info about imported chats ».