You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I believe I have run into an undocumented RPC error while working on an API tool that would let users reimport Telegram's chat exports back into itself. To do this, I was using the foreign chat import procedure and when calling InitHistoryImportRequest, I get the following error:
telethon.errors.rpcbaseerrors.BadRequestError: RPCError 400: IMPORT_PEER_TYPE_INVALID (caused by InitHistoryImportRequest)
I suspect that the error is caused by the chat export file being flagged as pm and the target peer being a group chat. Unfortunately, I haven't yet found a workaround for the issue so I'd welcome anyone's guess on the exact source of the error or how to get around it while importing.
Checklist
This is a documentation problem, not a question or a bug report.
I have searched for this issue before posting it and there isn't a duplicate.
The text was updated successfully, but these errors were encountered:
Thanks for the detailed report. I've stopped bothering updating the errors.csv file but you're welcome to send a PR.
As for workaround or guesses, I don't have any, but I can suggest using Telegram Desktop with debugmode enable, perform the action, then check the mtp log to see how it does it.
Description
Hello, I believe I have run into an undocumented RPC error while working on an API tool that would let users reimport Telegram's chat exports back into itself. To do this, I was using the foreign chat import procedure and when calling
InitHistoryImportRequest
, I get the following error:This specific
BadRequestError
is not listed in the relevant Telegram API docs, Telethon TL docs or the list of known errors spreadsheet.I suspect that the error is caused by the chat export file being flagged as
pm
and the target peer being a group chat. Unfortunately, I haven't yet found a workaround for the issue so I'd welcome anyone's guess on the exact source of the error or how to get around it while importing.Checklist
The text was updated successfully, but these errors were encountered: