Layer 220
method Users
account.uploadWallPaper#e39a8f03 flags:# for_chat:flags.0?true file:InputFile mime_type:string settings:WallPaperSettings = WallPaper;

Parameters

Name Type Description
Flags # Flags, see TL conditional fields
ForChat flags.0?true Set this flag when uploading wallpapers to be passed to messages. set Chat Wall Paper.
File InputFile The JPG/PNG wallpaper
MimeType string MIME type of uploaded wallpaper
Settings WallPaperSettings Wallpaper settings

Returns

WallPaper

Possible Errors

Code Type Description
400 WALLPAPER_FILE_INVALID The specified wallpaper file is invalid.
400 WALLPAPER_MIME_INVALID The specified wallpaper MIME type is invalid.

Gogram Example

// AccountUploadWallPaper - using Params struct
result, err := client.AccountUploadWallPaper(&tg.AccountUploadWallPaperParams{
    File: &tg.InputFile{ID: int64(0), Parts: 1, Name: "file.dat"},
    MimeType: "...",
    Settings: &tg.WallPaperSettings{},

    // Optional fields:
    // ForChat: true,
})
if err != nil {
    // handle error
}
// result is *tg.WallPaper