photos.uploadProfilePhoto

Updates current user profile photo.

photos.photo#20212ca8 photo:Photo users:Vector<User> = photos.Photo;
---functions---
photos.uploadProfilePhoto#4f32c098 file:InputFile = photos.Photo;

Parameters

Name Type Description
file InputFile File saved in parts by means of upload.saveFilePart method

Result

photos.Photo

Possible errors

Code Type Description
400 BOT_METHOD_INVALID This method can't be used by a bot
400 FILE_PARTS_INVALID The number of file parts is invalid
400 IMAGE_PROCESS_FAILED Failure while processing image
400 PHOTO_CROP_SIZE_SMALL Photo is too small
400 PHOTO_EXT_INVALID The extension of the photo is invalid

Related pages

upload.saveFilePart

Saves a part of file for futher sending to one of the methods.