Telegram MTProto
TL layer 236899 methodsOpenAPI 3.0.3

MTProto reference

messages.getHistory

Read chat history

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

NameTypeRequiredDescription
peerInputPeerYesA chat whose history you need to read.
offset_idintYesID of the message from which the selection begins.
offset_dateintYesDate for history offset in Unix seconds.
add_offsetintYesAdditional offset in messages.
limitintYesMaximum number of messages returned.
max_idintYesReturn messages with an ID less than the specified one.
min_idintYesReturn messages with an ID greater than the specified one.
hashlongYesA hash of previously received results to check for changes.

Responses

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.