Skip to main content

messages.setChatWallPaper

Set a custom wallpaper » in a specific private chat with another user.

func (c *Client) MessagesSetChatWallPaper(ctx context.Context, request *MessagesSetChatWallPaperRequest) (UpdatesClass, error)

Calling this method

client.Run(ctx, func(ctx context.Context) error {
api := client.API()

res, err := api.MessagesSetChatWallPaper(ctx, &tg.MessagesSetChatWallPaperRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // UpdatesClass
return nil
})

Parameters

NameTypeRequiredDescription
ForBothboolOnly for Premium users, sets the specified wallpaper for both users of the chat, without requiring confirmation from the other user.
RevertboolIf we don't like the new wallpaper the other user of the chat has chosen for us using the for_both flag, we can re-set our previous wallpaper just on our side using this flag.
PeerInputPeerClassyesThe private chat where the wallpaper will be set
WallpaperInputWallPaperClassThe wallpaper », obtained as described in the wallpaper documentation »; must not be provided when installing a wallpaper obtained from a messageActionSetChatWallPaper service message (id must be provided, instead).
SettingsWallPaperSettingsWallpaper settings, obtained as described in the wallpaper documentation » or from messageActionSetChatWallPaper.wallpaper.settings.
IDintIf the wallpaper was obtained from a messageActionSetChatWallPaper service message, must contain the ID of that message.

Returns

UpdatesClass

Possible errors

CodeTypeDescription
400PEER_ID_INVALIDThe provided peer id is invalid.
400WALLPAPER_INVALIDThe specified wallpaper is invalid.
400WALLPAPER_NOT_FOUNDThe specified wallpaper could not be found.

References