photos.UploadProfilePhoto

class pyrogram.raw.functions.photos.UploadProfilePhoto

Updates current user profile photo.

Details:
  • Layer: 223

  • ID: 388A3B5

Parameters:
  • fallback (bool, optional) – If set, the chosen profile photo will be shown to users that can’t display your main profile photo due to your privacy settings.

  • bot (InputUser, optional) – Can contain info of a bot we own, to change the profile photo of that bot, instead of the current user.

  • file (InputFile, optional) – Profile photo

  • video (InputFile, optional) – Animated profile picture video

  • video_start_ts (float 64-bit, optional) – Floating 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_markup (VideoSize, optional) – Animated sticker profile picture, must contain either a videoSizeEmojiMarkup or a videoSizeStickerMarkup constructor.

Returns:

photos.Photo

TL Schema

photos.uploadProfilePhoto#388a3b5
flags:#
fallback:flags.3?true
bot:flags.5?InputUser
file:flags.0?InputFile
video:flags.1?InputFile
video_start_ts:flags.2?double
video_emoji_markup:flags.4?VideoSize

= photos.Photo

Parameter Tree

UploadProfilePhoto
├── fallbacktrue (optional)
├── botInputUser (optional)
│ ├── InputUserEmpty
│ ├── InputUserSelf
│ ├── InputUser
│ │ ├── user_idlong
│ │ └── access_hashlong
│ └── InputUserFromMessage
│ ├── peerInputPeer
│ │ ├── InputPeerEmpty
│ │ ├── InputPeerSelf
│ │ ├── InputPeerChat
│ │ ├── InputPeerUser
│ │ ├── InputPeerChannel
│ │ ├── InputPeerUserFromMessage
│ │ └── InputPeerChannelFromMessage
│ ├── msg_idint
│ └── user_idlong
├── fileInputFile (optional)
│ ├── InputFile
│ │ ├── idlong
│ │ ├── partsint
│ │ ├── namestring
│ │ └── md5_checksumstring
│ ├── InputFileBig
│ │ ├── idlong
│ │ ├── partsint
│ │ └── namestring
│ └── idInputDocument
│ ├── InputDocumentEmpty
│ └── InputDocument
│ ├── idlong
│ ├── access_hashlong
│ └── file_referencebytes
├── videoInputFile (optional)
│ ├── InputFile
│ │ ├── idlong
│ │ ├── partsint
│ │ ├── namestring
│ │ └── md5_checksumstring
│ ├── InputFileBig
│ │ ├── idlong
│ │ ├── partsint
│ │ └── namestring
│ └── idInputDocument
│ ├── InputDocumentEmpty
│ └── InputDocument
│ ├── idlong
│ ├── access_hashlong
│ └── file_referencebytes
├── video_start_tsdouble (optional)
└── video_emoji_markupVideoSize (optional)
├── VideoSize
│ ├── typestring
│ ├── wint
│ ├── hint
│ ├── sizeint
│ └── video_start_tsdouble (optional)
│ ├── emoji_idlong
│ └── background_colorsVector < int >
├── stickersetInputStickerSet
│ ├── InputStickerSetEmpty
│ ├── InputStickerSetID
│ │ ├── idlong
│ │ └── access_hashlong
│ │ └── short_namestring
│ ├── InputStickerSetDice
│ │ └── emoticonstring
├── sticker_idlong
└── background_colorsVector < int >

Example

await app.invoke(
    UploadProfilePhoto(
        fallback=None,
        bot=await app.resolve_user(chat_id),
        file=InputFile(
            id=0,
            parts=0,
            name="text",
            md5_checksum="text"
        ),
        video=InputFile(
            id=0,
            parts=0,
            name="text",
            md5_checksum="text"
        ),
        video_start_ts=0.0,
        video_emoji_markup=VideoSize(
            type="text",
            w=0,
            h=0,
            size=0,
            video_start_ts=None
        ),
    )
)