set_profile_photo()¶
- Client.set_profile_photo()¶
Changes a profile photo for the current user.
Usable by Users Bots- Parameters:
photo (
InputChatPhoto, optional) – Profile photo to set.is_public (
bool, optional) – Pass True to set the public photo, which will be visible even if the main photo is hidden by privacy settings.
- Returns:
bool– True on success.
Example
# Set a new profile photo await app.set_profile_photo(photo=types.InputChatPhotoStatic("new_photo.jpg")) # Set a new profile video await app.set_profile_photo(photo=types.InputChatPhotoAnimation("new_video.mp4")) # Set a previous profile photo await app.set_profile_photo(photo=types.InputChatPhotoPrevious(file_id)) # Set/update your account's public profile photo await app.set_profile_photo(photo=types.InputChatPhotoStatic("new_photo.jpg"), is_public=True)