I'm getting tracks info via the API using the simple endpoint /tracks/
. This works fine for most tracks but for some I get a 403 error.
For example this one does't work:
http://api.soundcloud.com/tracks/232273455?client_id=<clientID>
returns:
HTTP/1.1 403 Forbidden
Access-Control-Allow-Headers: Accept, Authorization, Content-Type, Origin
Access-Control-Allow-Methods: GET, PUT, POST, DELETE
Access-Control-Allow-Origin: *
Access-Control-Expose-Headers: Date
Cache-Control: max-age=600, public
Cache-Control: private, max-age=0
Content-Length: 0
Content-Type: application/json; charset=utf-8
Date: Sat, 09 Apr 2016 09:39:00 GMT
Etag: "5a8b3e5cf857d1c73a6ec924804140e1"
Server: am/2
Status: 200 OK
Vary: Authorization, Accept
But this one works, with the same client id:
http://api.soundcloud.com/tracks/169170570?client_id=<clientID>
returns:
HTTP/1.1 200 OK
Access-Control-Allow-Headers: Accept, Authorization, Content-Type, Origin
Access-Control-Allow-Methods: GET, PUT, POST, DELETE
Access-Control-Allow-Origin: *
Access-Control-Expose-Headers: Date
Cache-Control: max-age=600, public
Content-Encoding: gzip
Content-Length: 765
Content-Type: application/json; charset=utf-8
Date: Sat, 09 Apr 2016 09:34:39 GMT
Etag: "0e64b4946489f72918940be1c559f1ee"
Server: am/2
Status: 200 OK
Vary: Authorization, Accept
{
"artwork_url": "https://i1.sndcdn.com/artworks-000098499957-8mkrc3-large.jpg",
"attachments_uri": "https://api.soundcloud.com/tracks/169170570/attachments",
"bpm": null,
"comment_count": 2015,
"commentable": true,
"created_at": "2014/09/24 15:23:54 +0000",
"description": "Urban Flora\n\n@galimatias\n\nCover art by: Oska \nhttp://instagram.com/oskadesign",
"download_count": 0,
.....
I don't know if it's a technical problem, or if it is possible that the user set some options to disallow embedding ? or some copyright issue ?
On the soundcloud page, the embed link is working... :
In any case it would be great to have a more detailed response, 403 means Forbidden
, but why ?
I have found some related issues but fairly old and no responses, like this one or this one