I can get the user rating for a song from the API as follows. As the API returns the success response, I understand my developer token and user token are in correct form and valid.
$ echo $url
https://api.music.apple.com/v1/me/ratings/songs/1249510807
$ curl -H "Authorization: Bearer $token" -H "Music-User-Token: $userToken" $url
{"data":[{"id":"1249510807","type":"ratings","href":"/v1/me/ratings/songs/1249510807","attributes":{"value":1}}]}
However when I try to delete the rating or set it API returns HTTP 501.
To delete the user rating I'm sending HTTP DELETE as described in API documentation:
$ curl -D - -X "DELETE" -H "Authorization: Bearer $token" -H "Music-User-Token: $userToken" $url
HTTP/1.1 501 Not Implemented
Server: AkamaiGHost
Mime-Version: 1.0
Content-Type: text/html
Content-Length: 298
Expires: Sun, 02 Jul 2017 09:18:20 GMT
Date: Sun, 02 Jul 2017 09:18:20 GMT
Connection: close
<HTML><HEAD>
<TITLE>Unsupported Request</TITLE>
</HEAD><BODY>
<H1>Unsupported Request</H1>
DELETE to http://api.music.apple.com/v1/me/ratings/songs/1249510807 not supported.<P>
Reference #8.296cd417.1498987100.11cbeb73
</BODY></HTML>
To set the rating to a different value, I use HTTP PUT with JSON payload as described in documentation:
$ curl -D - -X "PUT" --data "{\"type\":\"rating\",\"attributes\":{\"value\":-1}}" -H "Content-type: application/json" -H "Authorization: Bearer $token" -H "Music-User-Token: $userToken" $url
HTTP/1.1 501 Not Implemented
Server: AkamaiGHost
Mime-Version: 1.0
Content-Type: text/html
Content-Length: 295
Expires: Sun, 02 Jul 2017 09:16:55 GMT
Date: Sun, 02 Jul 2017 09:16:55 GMT
Connection: close
<HTML><HEAD>
<TITLE>Unsupported Request</TITLE>
</HEAD><BODY>
<H1>Unsupported Request</H1>
PUT to http://api.music.apple.com/v1/me/ratings/songs/1249510807 not supported.<P>
Reference #8.296cd417.1498987015.11caa18d
</BODY></HTML>
HTML response dumps the URL as HTTP, but I v that verify that my initial request is HTTPS.
Is there anyone executing these requests without problems?
Thanks in advance.
UPDATE: As of Jul 12th 2017, the API is returning documented responses. I guess it was a bug at the API side and it is fixed now.