Skip to main content

account.uploadRingtone

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

func (c *Client) AccountUploadRingtone(ctx context.Context, request *AccountUploadRingtoneRequest) (DocumentClass, error)

Calling this method

client.Run(ctx, func(ctx context.Context) error {
api := client.API()

res, err := api.AccountUploadRingtone(ctx, &tg.AccountUploadRingtoneRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // DocumentClass
return nil
})

Parameters

NameTypeRequiredDescription
FileInputFileClassyesNotification sound
FileNamestringyesFile name
MimeTypestringyesMIME type of file

Returns

DocumentClass

Possible errors

CodeTypeDescription
400RINGTONE_MIME_INVALIDThe MIME type for the ringtone is invalid.

References