Telegram MTProto
TL レイヤー 236899 件のメソッドOpenAPI 3.0.3

MTProto reference

messages.getHistory

Read chat history

Returns the message page of the selected chat in order from newest to oldest.

名前型必須説明
peerInputPeerはいA chat whose history you need to read.
offset_idintはいID of the message from which the selection begins.
offset_dateintはいDate for history offset in Unix seconds.
add_offsetintはいAdditional offset in messages.
limitintはいMaximum number of messages returned.
max_idintはいReturn messages with an ID less than the specified one.
min_idintはいReturn messages with an ID greater than the specified one.
hashlongはいA hash of previously received results to check for changes.

レスポンス

messages.Messages

MTProto RPC

  • 400 · CHANNEL_INVALID — The provided channel is invalid.
  • 406 · CHANNEL_PRIVATE — You haven't joined this channel/supergroup.
  • 400 · CHAT_ID_INVALID — The provided chat id is invalid.
  • 400 · CHAT_NOT_MODIFIED — No changes were made to chat information because the new information you passed is identical to the current information.
  • 400 · FROZEN_PARTICIPANT_MISSING — The current account is [frozen](https://core.telegram.org/api/auth.md#frozen-accounts), and cannot access the specified peer.
  • 400 · MSG_ID_INVALID — Invalid message ID provided.
  • 400 · PEER_ID_INVALID — The provided peer id is invalid.
  • 400 · TAKEOUT_INVALID — The specified takeout ID is invalid.

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.