photos.uploadContactProfilePhoto
Upload a custom profile picture for a contact, or suggest a new profile picture to a contact.
| 名前 | 型 | 必須 | 説明 |
|---|---|---|---|
suggest | true | いいえ | 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 | いいえ | 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 | はい | The contact |
file | InputFile | いいえ | Profile photo |
video | InputFile | いいえ | [Animated profile picture](https://core.telegram.org/api/files.md#animated-profile-pictures) 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 | いいえ | アニメーションステッカーのプロフィール画像には、[videoSizeEmojiMarkup](https://core.telegram.org/constructor/videoSizeEmojiMarkup.md)] または [videoSizeStickerMarkup](https://core.telegram.org/constructor/videoSizeStickerMarkup.md)] コンストラクターが含まれている必要があります。 |
レスポンス
photos.Photo
MTProto RPC
- 400 · CONTACT_MISSING — The specified user is not a contact.
- 400 · NEED_ACTION_MISSING — The caller didn't specify a valid action (either save or suggest) for the contact profile photo upload.
- 400 · USER_ID_INVALID — The provided user ID is invalid.