1

I am trying to get the rating for a song via the Apple Music API, as it describes here.

Hence, the URL I am using is:

https://api.music.apple.com/v1/me/ratings/songs/493341471

493341471 is the playbackStoreID (of the MPMediaItem) of the song 'Born to Die'. I have this song in my library, and I have added it to my "loved" list both on iTunes on my computer and on my iPhone. Yet, when I make this GET request, I get back a 404 Resource not Found error from Apple.

I also tried the same url but using the MPMediaItem property persistentId (its persistentID is 2932020188133715832), and that didn't work either.

The documentation says the url format is

https://api.music.apple.com/v1/me/ratings/songs/{id}

and their example gives a 9 digit id, exactly as the playbackStoreID I used above.

I tried searching the Apple Music catalogue for this song, and the id that was returned was indeed 493341471.

Yet, no matter what I do, I get a resource not found. Anyone have any idea what "id" the documentation here may be referring to?

shim
  • 9,289
  • 12
  • 69
  • 108
jjjjjjjj
  • 4,203
  • 11
  • 53
  • 72

1 Answers1

0

Seems like you have to like/dislike a specific song with your apple music account then you can get an HTTP 200 response.

  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community May 12 '22 at 22:28