telegram api method · layer 229 · #09e82039

photos.updateProfilePhoto

usable by users and bots

Installs a previously uploaded photo as a profile photo.

definition

photos.updateProfilePhoto#9e82039 flags:# fallback:flags.0?true bot:flags.1?InputUser id:InputPhoto = photos.Photo;

parameters

nametypedescription
flags#Flags, see TL conditional fields
fallbackflags.0?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.1?InputUserCan contain info of a bot we own, to change the profile photo of that bot, instead of the current user.
idInputPhotoInput photo

returns

photos.Photo

errors (9)

codeerrordescription
400ALBUM_PHOTOS_TOO_MANYYou have uploaded too many profile photos, delete some before retrying.
400BOT_FALLBACK_UNSUPPORTEDThe fallback flag can't be set for bots.
400FILE_PARTS_INVALIDThe number of file parts is invalid.
400IMAGE_PROCESS_FAILEDFailure while processing image.
400LOCATION_INVALIDThe provided location is invalid.
400PHOTO_CROP_SIZE_SMALLPhoto is too small.
400PHOTO_EXT_INVALIDThe extension of the photo is invalid.
400PHOTO_ID_INVALIDPhoto ID 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
#eef579a02–46
#f0bb515262–115
#72d4742c116–150
#1c3d5956151–156
#09e82039158–229