account.uploadRingtone #

Upload notification sound, use account.saveRingtone to convert it and add it to the list of saved notification sounds.

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.uploadRingtone#831a83a2 file:InputFile file_name:string mime_type:string = Document;

Parameters #

NameTypeDescription
fileInputFileNotification sound
file_namestringFile name
mime_typestringMIME type of file

Result #

Document

Only users can use this method #

Possible errors #

CodeTypeDescription
400RINGTONE_MIME_INVALIDThe MIME type for the ringtone is invalid.

account.saveRingtone #

Save or remove saved notification sound.

If the notification sound is already in MP3 format, account.savedRingtone will be returned.
Otherwise, it will be automatically converted and a account.savedRingtoneConverted will be returned, containing a new document object that should be used to refer to the ringtone from now on (ie when deleting it using the unsave parameter, or when downloading it).