Skip to main content

account.uploadWallPaper

Create and upload a new wallpaper

func (c *Client) AccountUploadWallPaper(ctx context.Context, request *AccountUploadWallPaperRequest) (WallPaperClass, error)

Calling this method

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

res, err := api.AccountUploadWallPaper(ctx, &tg.AccountUploadWallPaperRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // WallPaperClass
return nil
})

Parameters

NameTypeRequiredDescription
ForChatboolSet this flag when uploading wallpapers to be passed to messages.setChatWallPaper.
FileInputFileClassyesThe JPG/PNG wallpaper
MimeTypestringyesMIME type of uploaded wallpaper
SettingsWallPaperSettingsyesWallpaper settings

Returns

WallPaperClass

Possible errors

CodeTypeDescription
400WALLPAPER_FILE_INVALIDThe specified wallpaper file is invalid.
400WALLPAPER_MIME_INVALIDThe specified wallpaper MIME type is invalid.

References