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
| Name | Type | Required | Description |
|---|---|---|---|
ForChat | bool | — | Set this flag when uploading wallpapers to be passed to messages.setChatWallPaper. |
File | InputFileClass | yes | The JPG/PNG wallpaper |
MimeType | string | yes | MIME type of uploaded wallpaper |
Settings | WallPaperSettings | yes | Wallpaper settings |
Returns
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. |
References
- Official documentation
- Generated Go reference
- TL definition:
account.uploadWallPaper#e39a8f03