telegram api method · layer 229 · #0388a3b5

photos.uploadProfilePhoto

usable by users and bots

Updates current user profile photo.

definition

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;

parameters

nametypedescription
flags#Flags, see TL conditional fields
fallbackflags.3?trueIf set, the chosen profile photo will be shown to users that can't display your main profile photo due to your privacy settings.
botflags.5?InputUserCan contain info of a bot we own, to change the profile photo of that bot, instead of the current user.
fileflags.0?InputFileProfile photo
videoflags.1?InputFileAnimated profile picture video
video_start_tsflags.2?doubleFloating 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_markupflags.4?VideoSizeAnimated sticker profile picture, must contain either a videoSizeEmojiMarkup or a videoSizeStickerMarkup constructor.

returns

photos.Photo

errors (13)

codeerrordescription
400ALBUM_PHOTOS_TOO_MANYYou have uploaded too many profile photos, delete some before retrying.
400BOT_INVALIDThis is not a valid bot.
400EMOJI_MARKUP_INVALIDThe specified video_emoji_markup was invalid.
400FILE_PARTS_INVALIDThe number of file parts is invalid.
400IMAGE_PROCESS_FAILEDFailure while processing image.
400PHOTO_CROP_FILE_MISSINGPhoto crop file missing.
400PHOTO_CROP_SIZE_SMALLPhoto is too small.
400PHOTO_EXT_INVALIDThe extension of the photo is invalid.
400PHOTO_FILE_MISSINGProfile photo file missing.
400PHOTO_INVALIDPhoto invalid.
400STICKER_MIME_INVALIDThe specified sticker MIME type is invalid.
400VIDEO_FILE_INVALIDThe specified video file is invalid.
401AUTH_KEY_UNREGISTEREDThe specified authorization key is not registered in the system (for example, a PFS temporary key has expired).

history

present in layers 2–229 · constructor id changed 4×

idlayers
#d50f9c882–46
#4f32c09862–115
#89f30f69116–151
#093c9a51152–156
#0388a3b5158–229