API doesn't work for some tracks

  • 21 January 2018
  • 3 replies

Hey there,
Half a day has past and I'm still blocked on this, so I give up, need some help here guys.

Why the API returns a 401 forbiden for this track:

While working like a charm for this one: ?

I don't see any notable difference between them? Just the fact that the not working one is newer
How to avoid this?

I'm using mainly PHP to code my website & to crawl API info, like this:


# Creating a flux context to add the "user-agent" tag in the headers to keep SoundCloud alert system calm
$opts = array('http'=>array('header'=>"User-agent: Chrome\r\n"));
$context = stream_context_create($opts);

# Getting API info
$url = "";
echo(file_get_contents('' . $url . '&client_id=a39cf***********************a9c3', false, $context));


3 replies

Edit: even digging the ID of the track from the "Embed" option of the track and putting it on the url like so:**********

doesn't solve the issue, I still get the forbiden error, raaaa è.é
Userlevel 7
Badge +3
Hi there,

Dj Carnage's content is available to SoundCloud Go+ users exclusively. Thus, his content cannot be queried from the API.