account.uploadTheme
Upload theme
func (c *Client) AccountUploadTheme(ctx context.Context, request *AccountUploadThemeRequest) (DocumentClass, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.AccountUploadTheme(ctx, &tg.AccountUploadThemeRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // DocumentClass
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
File | InputFileClass | yes | Previously uploaded theme file with platform-specific colors for UI components, can be left unset when creating themes that only modify the wallpaper or accent colors. |
Thumb | InputFileClass | — | Thumbnail |
FileName | string | yes | File name |
MimeType | string | yes | MIME type, must be application/x-tgtheme-{format}, where format depends on the client |
Returns
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | THEME_FILE_INVALID | Invalid theme file provided. |
| 400 | THEME_MIME_INVALID | The theme's MIME type is invalid. |
References
- Official documentation
- Generated Go reference
- TL definition:
account.uploadTheme#1c3db333