UploadContactProfilePhotoRequest
Both users and bots may be able to use this method. See code examples.
---functions--- photos.uploadContactProfilePhoto#b91a83bf flags:# suggest:flags.3?true save:flags.4?true user_id:InputUser file:flags.0?InputFile video:flags.1?InputFile video_start_ts:flags.2?double = photos.Photo
Returns
photos.Photo |
This type can only be an instance of:
Photo |
Parameters
user_id | InputUser | Anything entity-like will work if the library can find its Input version (e.g., usernames, Peer , User or Channel objects, etc.). |
suggest | flag | This argument defaults to None and can be omitted. |
save | flag | This argument defaults to None and can be omitted. |
file | InputFile | This argument defaults to None and can be omitted. |
video | InputFile | This argument defaults to None and can be omitted. |
video_start_ts | double | This argument defaults to None and can be omitted. |
Known RPC errors
This request can't cause any RPC error as far as we know.
Example
from telethon.sync import TelegramClient from telethon import functions, types with TelegramClient(name, api_id, api_hash) as client: result = client(functions.photos.UploadContactProfilePhotoRequest( user_id='username', suggest=True, save=True, file=client.upload_file('/path/to/file.jpg'), video=client.upload_file('/path/to/file.mp4'), video_start_ts=7.13 )) print(result.stringify())