account.uploadTheme #

Upload theme

Layer 223

documentEmpty#36f8c871 id:long = Document;
document#8fd4c4d8 flags:# id:long access_hash:long file_reference:bytes date:int mime_type:string size:long thumbs:flags.0?Vector<PhotoSize> video_thumbs:flags.1?Vector<VideoSize> dc_id:int attributes:Vector<DocumentAttribute> = Document;
---functions---
account.uploadTheme#1c3db333 flags:# file:InputFile thumb:flags.0?InputFile file_name:string mime_type:string = Document;

Parameters #

NameTypeDescription
flags#Flags, see TL conditional fields
fileInputFilePreviously 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.
thumbflags.0?InputFileThumbnail
file_namestringFile name
mime_typestringMIME type, must be application/x-tgtheme-{format}, where format depends on the client

Result #

Document

Only users can use this method #

Possible errors #

CodeTypeDescription
400THEME_FILE_INVALIDInvalid theme file provided.
400THEME_MIME_INVALIDThe theme's MIME type is invalid.

Telegram themes #

Telegram apps support generating, sharing and synchronizing app themes.