Link Search Menu Expand Document

Method: photos.updateProfilePhoto

Back to methods index

Installs a previously uploaded photo as a profile photo.


fallbackBoolIf set, the chosen profile photo will be shown to users that can’t display your main profile photo due to your privacy settings.Optional
botUsername, chat ID, Update, Message or InputUserCan contain info of a bot we own, to change the profile photo of that bot, instead of the current user.Optional
idMessageMedia, Update, Message or InputPhotoInput photoOptional

Return type: photos.Photo

Can bots use this method: YES

MadelineProto Example (now async for huge speed and parallelism!):

if (!file_exists('madeline.php')) {
    copy('', 'madeline.php');
include 'madeline.php';

$MadelineProto = new \danog\MadelineProto\API('session.madeline');

$photos_Photo = $MadelineProto->photos->updateProfilePhoto(fallback: $Bool, bot: $InputUser, id: $InputPhoto, );