Upload notification sound, use account.saveRingtone to convert it and add it to the list of saved notification sounds.
documentEmpty#36f8c871 id:long = Document;
document#1e87342b flags:# id:long access_hash:long file_reference:bytes date:int mime_type:string size:int 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;
Name | Type | Description |
---|---|---|
file | InputFile | Notification sound |
file_name | string | File name |
mime_type | string | MIME type of file |
Code | Type | Description |
---|---|---|
400 | RINGTONE_MIME_INVALID | The MIME type for the ringtone is invalid. |
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).