photos.updateProfilePhoto #

Installs a previously uploaded photo as a profile photo.

Layer 223

photos.photo#20212ca8 photo:Photo users:Vector<User> = photos.Photo;
---functions---
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

Result #

photos.Photo

Both users and bots can use this method #

Possible errors #

CodeTypeDescription
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.