Import chat history from a foreign chat app into a specific Telegram chat, click here for more info about imported chats ».
 Method schema is available as of layer 123. Switch »
| Name | Type | Description | 
|---|---|---|
| peer | InputPeer | The Telegram chat where the history should be imported. | 
| file | InputFile | File with messages to import. | 
| media_count | int | Number of media files associated with the chat that will be uploaded using messages.uploadImportedMedia. | 
| Code | Type | Description | 
|---|---|---|
| 400 | CHAT_ADMIN_REQUIRED | You must be an admin in this chat to do this. | 
| 400 | IMPORT_FILE_INVALID | The specified chat export file is invalid. | 
| 400 | IMPORT_FORMAT_DATE_INVALID | The date specified in the import file is invalid. | 
| 400 | IMPORT_FORMAT_UNRECOGNIZED | The specified chat export file was exported from an unsupported chat app. | 
| 400 | PEER_ID_INVALID | The provided peer id is invalid. | 
| 406 | PREVIOUS_CHAT_IMPORT_ACTIVE_WAIT_%dMIN | Import for this chat is already in progress, wait %d minutes before starting a new one. | 
Telegram allows importing messages and media from foreign chat apps.
Upload a media file associated with an imported chat, click here for more info ».