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
| Name | Type | Required | Description |
|---|---|---|---|
File | InputFileClass | yes | Notification sound |
FileName | string | yes | File name |
MimeType | string | yes | MIME type of file |
Returns
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | RINGTONE_MIME_INVALID | The MIME type for the ringtone is invalid. |
References
- Official documentation
- Generated Go reference
- TL definition:
account.uploadRingtone#831a83a2