Layer 224
method Users
account.saveMusic#b26732a9 flags:# unsave:flags.0?true id:InputDocument after_id:flags.1?InputDocument = Bool;

Parameters

Name Type Description
Unsave flags.0?true If set, removes the song.
Id InputDocument The song to add or remove; can be an already added song when reordering songs with after_id. Adding an already added song will never re-add it, only move it to the top of the song list (or after the song passed in after_id ).
AfterId flags.1?InputDocument If set, the song will be added after the passed song (must be already pinned on the profile).

Returns

Bool

Gogram Example

// AccountSaveMusic - using Params struct
result, err := client.AccountSaveMusic(&tg.AccountSaveMusicParams{
    Id: &tg.InputDocument{ID: int64(5678901234567890), AccessHash: int64(1234567890123456), FileReference: []byte{0x01, 0x02}},

    // Optional fields:
    // Unsave: true,
    // AfterId: &tg.InputDocument{ID: int64(5678901234567890), AccessHash: int64(1234567890123456), FileReference: []byte{0x01, 0x02}},
})
if err != nil {
    // handle error
}
// result is *tg.Bool

Possible Errors

Code Type Description
400 DOCUMENT_INVALID The specified document is invalid.