Telegram MTProto
TL layer 236899 methodsOpenAPI 3.0.3

MTProto reference

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).

NameTypeRequiredDescription
peerInputPeerYesThe Telegram chat where the [history should be imported](https://core.telegram.org/api/import.md).
fileInputFileYesFile with messages to import.
media_countintYesNumber of media files associated with the chat that will be uploaded using [messages.uploadImportedMedia](https://core.telegram.org/method/messages.uploadImportedMedia.md).

Responses

messages.HistoryImport

MTProto RPC

  • 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.
  • 400 · USER_NOT_MUTUAL_CONTACT — The provided user is not a mutual contact.

Telegram documentation ↗

Пользователи users.getFullUser
POST users.getFullUser

Получить подробный профиль пользователя

Возвращает расширенные сведения о пользователе. В ответе могут быть описание профиля и связанные пользователи или чаты.

ПользователиTL: users.getFullUserДоступен пользователям и ботам

Параметры запроса

Параметр
id
Тип
InputUser
Обязательный
Да
Описание
Пользователь, сведения о котором нужно получить.
Тип InputUser

Указывает пользователя для дальнейшего взаимодействия.

КонструкторПоляОписание
inputUseruser_id: longID пользователяaccess_hash: longЗначение access_hash из конструктора userУказывает пользователя для дальнейшего взаимодействия.
inputUserSelf—Текущий пользователь
inputUserFromMessagepeer: InputPeerЧат, в котором встретился пользовательmsg_id: intID сообщенияuser_id: longID пользователяПользователь с признаком min из конкретного сообщения чата
inputUserEmpty—Пустой конструктор, который не указывает пользователя

Авторизация Telegram

Сессия хранится в этой вкладке. Запрос выполняется напрямую к Telegram.