telegram api method · layer 229 · #0388a3b5
photos.uploadProfilePhoto
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
| name | type | description |
|---|---|---|
flags | # | Flags, see TL conditional fields |
fallback | true | 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 | Can contain info of a bot we own, to change the profile photo of that bot, instead of the current user. |
file | InputFile | Profile photo |
video | InputFile | Animated profile picture video |
video_start_ts | double | 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 | Animated sticker profile picture, must contain either a videoSizeEmojiMarkup or a videoSizeStickerMarkup constructor. |
returns
errors (13)
| code | error | description |
|---|---|---|
| 400 | ALBUM_PHOTOS_TOO_MANY | You have uploaded too many profile photos, delete some before retrying. |
| 400 | BOT_INVALID | This is not a valid bot. |
| 400 | EMOJI_MARKUP_INVALID | The specified video_emoji_markup was invalid. |
| 400 | FILE_PARTS_INVALID | The number of file parts is invalid. |
| 400 | IMAGE_PROCESS_FAILED | Failure while processing image. |
| 400 | PHOTO_CROP_FILE_MISSING | Photo crop file missing. |
| 400 | PHOTO_CROP_SIZE_SMALL | Photo is too small. |
| 400 | PHOTO_EXT_INVALID | The extension of the photo is invalid. |
| 400 | PHOTO_FILE_MISSING | Profile photo file missing. |
| 400 | PHOTO_INVALID | Photo invalid. |
| 400 | STICKER_MIME_INVALID | The specified sticker MIME type is invalid. |
| 400 | VIDEO_FILE_INVALID | The specified video file is invalid. |
| 401 | AUTH_KEY_UNREGISTERED | The 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×
| id | layers |
|---|---|
| #d50f9c88 | 2–46 |
| #4f32c098 | 62–115 |
| #89f30f69 | 116–151 |
| #093c9a51 | 152–156 |
| #0388a3b5 | 158–229 |