Layer 220
AccountUploadTheme
Upload theme
method
Users
account.uploadTheme#1c3db333 flags:# file:InputFile thumb:flags.0?InputFile file_name:string mime_type:string = Document;
Parameters
| Name | Type | Description |
|---|---|---|
| Flags | # | Flags, see TL conditional fields |
| File | InputFile | 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 | flags.0?InputFile | Thumbnail |
| FileName | string | File name |
| MimeType | string | MIME type, must be application/x-tgtheme-{format}, where format depends on the client |
Returns
DocumentPossible Errors
| Code | Type | Description |
|---|---|---|
| 400 | THEME_FILE_INVALID | Invalid theme file provided. |
| 400 | THEME_MIME_INVALID | The theme's MIME type is invalid. |
Gogram Example
// AccountUploadTheme - using Params struct result, err := client.AccountUploadTheme(&tg.AccountUploadThemeParams{ File: &tg.InputFile{ID: int64(0), Parts: 1, Name: "file.dat"}, FileName: "...", MimeType: "...", // Optional fields: // Thumb: &tg.InputFile{ID: int64(0), Parts: 1, Name: "file.dat"}, }) if err != nil { // handle error } // result is *tg.Document