DELETE/PUT in AppleMusic API

Hi,

Since today, we are no more able to do DELETE/PUT request on the Apple Music API.

So, we can't update a playlist details, delete a playlist, delete tracks in playlist, delete tracks in library...

Old methods allowed are now returning only an HTTP Code 403.


Why this change in the Apple Music API ? We can hope that will be back soon ?

Any update ?

Hi,

I'm still looking on a way to delete a track in a playlist thanks the Apple Music API (it has been possible when you have released the API).

Can you give us more details when we will be able to do that again ?


Thank you.

Only the ability to add items to the Cloud Library and editable playlists is currently available in the Apple Music API. Thank you for the feedback, we understand developers would like the ability to work with the library in additional ways using these APIs.

Great !

Do you have any expected date for this so ?

Thank you, glad to hear you have this idea in head.

Is there any plans to add DELETE methods to the Apple Music API, especially for playlists?

This limitation is a showstopper for my project.

with apple music web launched yesterday, i thought i would see if they allow any deleting of resources.


the good news: they do. you can delete albums, though it does it in a weird way, by deleting all the songs from the album one after another by sending a DELETE command to /v1/library/<songid>. this doesn't work very well as half the time that endpoint 404's for all the requests and even if it doesn't, the album doesn't disappear. beta software i guess. but none of that matters because of ...


the bad news: apple music web uses a special secret api hosted at amp-api.music.apple.com, which your userTokens won't work against (tried it in Paw).


In summary, ¯\_(ツ)_/¯

Please add support to remove saved songs/albums/artists! This is key functionality for managing a user's library.

Is there an update on this?
Hi, the update is that Apple Music API only allows adding to the cloud library Cloud Library and editable playlists at this time. We are still aware that developers using Apple Music API would like the ability to work with the library in additional including deleting tracks from the user's library.
@_jb, these endpoints are enabled for the amp-api domain that Apple Music for Web uses. Do you have a timeline for when they will be enabled for developers or are we just out of luck?
So we can't remove tracks that we added to a playlist? Pretty strange API design...

No wonder Spotify have much more going on, on their playlists.
I’d love to see DELETE/PUT endpoints for playlist tracks and POST for playlist descriptions. These would give developers a lot more to work with in their apps. As it stands now, if I want to update an existing playlist, I have to delete songs via the Music app on either iOS or MacOS.
Can someone explain the reasoning behind removing functionality that was previously offered? When a user is in one of our apps and adds a song to their library, shouldn't they be able to undo that action??

How about some documentation as well? Why is "Add a Resource to a Library" only under the albums section of the API docs? You might as well call out this intentional limitation there.
To _jb and the Apple engineering team:

Is there an “official” way to request new Apple Music API endpoints, or is this forum the best place? Here’s my wishlist. Everyone else please reply with yours too!
  • PUT: replace or reorder tracks from a start to an end index

  • DELETE: delete tracks at specific indices

  • POST: update playlist name, description and image

Another request would be making user-generated playlists visible to 3rd-party clients, such as Sonos. Right now I can only see Apple’s playlists.

Thanks!

It is really disappointing, that such feature is not available in a so called API. We truly need this feature. I hope it will be implemented soon!

Thanks.

Is there any update on this? I think that reordering playlists and deleting tracks should be an essential feature in the Apple Music API, and that not having these features, severely limits its usability.

Hello @HeyImHere,

We do not communicate status of any feature request other than to say that we are either investigating the feasibility, or that we have released an update including said feature.

In this particular case, all I can say is that we have heard the request.

If you are interested in this, it would be helpful for you to file a ticket on Feedback Assistant explaining your use-case for DELETE and PUT methods in Apple Music API. Even if others have filed similar tickets, your use-case may be a bit different, and we want to hear about it. And, internally, we use the number of duplicate requests as a signal that helps us prioritize the various things we may want to improve on.

Thank you very much for your feedback.

Best regards,

For anyone interested, the DELETE API already exists, but you need a "special" developer token fetched from music.apple.com and Music-User-Token accordingly to call it. Steps are as follows:

  • visit music.apple.com and sign in, then go to the console of your browser
  • input MusicKit.getInstance().musicUserToken to get your user token
  • input MusicKit.getInstance().developerToken to get the privileged developer token

Then you could try the DELETE API

curl --location --request DELETE 'https://amp-api.music.apple.com/v1/me/library/songs/{songId}' \
--header 'Music-User-Token: {The User Token you got}' \
--header 'Authorization: Bearer eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IldlYlBsYXlLaWQifQ.eyJpc3MiOiJBTVBXZWJQbGF5IiwiaWF0IjoxNjQ2NDM1NTgxLCJleHAiOjE2NjE5ODc1ODF9.Ob5bfZBWLDlDkR4r5fNXIjp1Y1G0qY5mP9MVBm1mDFjG701_6AcZS6nwjk-CMJE2b8VLv1JWxKR5j5BDkKxQ7w'

For more details you could visit my another post

DELETE/PUT in AppleMusic API
 
 
Q