Telegram MTProto
TL layer 236899 methodsOpenAPI 3.0.3

MTProto guide

photos.uploadContactProfilePhoto

Upload a custom profile picture for a contact, or suggest a new profile picture to a contact.

NameTypeRequiredDescription
suggesttrueNoIf set, will send a [messageActionSuggestProfilePhoto](https://core.telegram.org/constructor/messageActionSuggestProfilePhoto.md) service message to `user_id`, suggesting them to use the specified profile picture; otherwise, will set a personal profile picture for the user (only visible to the current user).
savetrueNoIf set, removes a previously set personal profile picture (does not affect suggested profile pictures, to remove them simply delete the [messageActionSuggestProfilePhoto](https://core.telegram.org/constructor/messageActionSuggestProfilePhoto.md) service message with [messages.deleteMessages](https://core.telegram.org/method/messages.deleteMessages.md)).
user_idInputUserYesThe contact
fileInputFileNoProfile photo
videoInputFileNo[Animated profile picture](https://core.telegram.org/api/files.md#animated-profile-pictures) video
video_start_tsdoubleNoFloating point UNIX timestamp in seconds, indicating the frame of the video/sticker that should be used as static preview; can only be used if `video` or `video_emoji_markup` is set.
video_emoji_markupVideoSizeNoAnimated sticker profile picture, must contain either a [videoSizeEmojiMarkup](https://core.telegram.org/constructor/videoSizeEmojiMarkup.md) or a [videoSizeStickerMarkup](https://core.telegram.org/constructor/videoSizeStickerMarkup.md) constructor.

Replies

photos.Photo

MTProto RPC

  • 400 · CONTACT_MISSING — The specified user is not a contact.
  • 400 · NEED_ACTION_MISSING — The caller didn't specify a valid action (either save or suggest) for the contact profile photo upload.
  • 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.