photos.uploadContactProfilePhoto
Upload a custom profile picture for a contact, or suggest a new profile picture to a contact.
| Name | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
suggest | true | Nein | If set, will send a [messageActionSuggestProfilePhoto](https://core.telegram.org/constructor/messageActionSuggestProfilePhoto.md) service message to `user_id`, suggesting them to use the specified profile picture; otherwise, will set a personal profile picture for the user (only visible to the current user). |
save | true | Nein | If set, removes a previously set personal profile picture (does not affect suggested profile pictures, to remove them simply delete the [messageActionSuggestProfilePhoto](https://core.telegram.org/constructor/messageActionSuggestProfilePhoto.md) service message with [messages.deleteMessages](https://core.telegram.org/method/messages.deleteMessages.md)). |
user_id | InputUser | Ja | The contact |
file | InputFile | Nein | Profile photo |
video | InputFile | Nein | [Animated profile picture](https://core.telegram.org/api/files.md#animated-profile-pictures) video |
video_start_ts | double | Nein | Fließkomma UNIX Zeitstempel in Sekunden, der den Frame des Videos/Stickers angibt, der als statische Vorschau verwendet werden soll; kann nur verwendet werden, wenn `video` oder `video_emoji_markup` eingestellt ist. |
video_emoji_markup | VideoSize | Nein | Animiertes Sticker-Profilbild, muss entweder einen [videoSizeEmojiMarkup](https://core.telegram.org/constructor/videoSizeEmojiMarkup.md)- oder einen [videoSizeStickerMarkup](https://core.telegram.org/constructor/videoSizeStickerMarkup.md)]-Konstruktor enthalten. |
Antworten
photos.Photo
MTProto RPC
- 400 · CONTACT_MISSING – Der angegebene Benutzer ist kein Kontakt.
- 400 · NEED_ACTION_MISSING – Der Anrufer hat keine gültige Aktion (entweder Speichern oder Vorschlagen) für das Hochladen des Kontaktprofilfotos angegeben.
- 400 · USER_ID_INVALID – Die angegebene Benutzer-ID ist ungültig.