Telegram MTProto
TL layer 236899 methodsOpenAPI 3.0.3

MTProto reference

messages.search

Find chat messages

Searches for messages based on your query and additional conditions, such as author, date, or attachment type.

NameTypeRequiredDescription
peerInputPeerYesChat to search.
qstringYesSearch query text.
from_idInputPeerNoThe author by whom the sample is limited.
saved_peer_idInputPeerNoSearch within the [saved message dialog »](https://core.telegram.org/api/saved-messages.md) with this ID.
saved_reactionVector<Reaction>NoYou may search for [saved messages tagged »](https://core.telegram.org/api/saved-messages.md#tags) with one or more reactions using this flag.
top_msg_idintNoID of the thread's topic or top message.
filterMessagesFilterYesFilter by type of message or attachment.
min_dateintYesLower bound for message date in Unix seconds.
max_dateintYesUpper limit of the message date in Unix seconds.
offset_idintYesOnly return messages starting from the specified message ID
add_offsetintYes[Additional offset](https://core.telegram.org/api/offsets.md)
limitintYesMaximum number of results per issue.
max_idintYes[Maximum message ID to return](https://core.telegram.org/api/offsets.md)
min_idintYes[Minimum message ID to return](https://core.telegram.org/api/offsets.md)
hashlongYes[Hash](https://core.telegram.org/api/offsets.md)

Responses

messages.Messages

MTProto RPC

  • 400 · CHANNEL_INVALID — The provided channel is invalid.
  • 400 · CHANNEL_PRIVATE — You haven't joined this channel/supergroup.
  • 403 · CHAT_ADMIN_REQUIRED — You must be an admin in this chat to do this.
  • 400 · CHAT_ID_INVALID — The provided chat id is invalid.
  • 400 · FROM_PEER_INVALID — The specified from_id is invalid.
  • 400 · INPUT_FILTER_INVALID — The specified filter is invalid.
  • 400 · INPUT_USER_DEACTIVATED — The specified user was deleted.
  • 400 · MSG_ID_INVALID — Invalid message ID provided.
  • 400 · PEER_ID_INVALID — The provided peer id is invalid.
  • 400 · PEER_ID_NOT_SUPPORTED — The provided peer ID is not supported.
  • 400 · SEARCH_QUERY_EMPTY — The search query is empty.
  • 400 · TAKEOUT_INVALID — The specified takeout ID is invalid.
  • 400 · USER_ID_INVALID — The provided user 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.