messages.initHistoryImport
Import chat history from a foreign chat app into a specific Telegram chat, click here for more info about imported chats ».
Import chat history from a foreign chat app into a specific Telegram chat, [click here for more info about imported chats »](https://core.telegram.org/api/import.md).
| Name | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
peer | InputPeer | Ja | The Telegram chat where the [history should be imported](https://core.telegram.org/api/import.md). |
file | InputFile | Ja | File with messages to import. |
media_count | int | Ja | Number of media files associated with the chat that will be uploaded using [messages.uploadImportedMedia](https://core.telegram.org/method/messages.uploadImportedMedia.md). |
Antworten
messages.HistoryImport
MTProto RPC
- 400 · CHAT_ADMIN_REQUIRED — Um dies zu tun, müssen Sie in diesem Chat Administrator sein.
- 400 · IMPORT_FILE_INVALID – Die angegebene Chat-Exportdatei ist ungültig.
- 400 · IMPORT_FORMAT_DATE_INVALID – Das in der Importdatei angegebene Datum ist ungültig.
- 400 · IMPORT_FORMAT_UNRECOGNIZED – Die angegebene Chat-Exportdatei wurde aus einer nicht unterstützten Chat-App exportiert.
- 400 · PEER_ID_INVALID – Die angegebene Peer-ID ist ungültig.
- 406 · PREVIOUS_CHAT_IMPORT_ACTIVE_WAIT_%dMIN — Import for this chat is already in progress, wait %d minutes before starting a new one.
- 400 · USER_NOT_MUTUAL_CONTACT — Der angegebene Benutzer ist kein gemeinsamer Kontakt.