Take the 2-minute tour ×

I am trying to do a search query on the SoundCloud API.

Using their JavaScript SDK, the following works:

SC.get('/tracks', { q: 'punk' }, function(tracks) {

But if I try to do the same query using cURL:

curl -v http://api.soundcloud.com/tracks?q=punk&client_id=xxxx

It says <error>401 - Unauthorized</error>

If I change the order of the query params http://api.soundcloud.com/tracks?client_id=xxxx&q=punk it will disregard the q param and respond with the default track listing.

What is the proper way to query the tracks endpoint from cURL?

share|improve this question

1 Answer 1

There's nothing incorrect about the URL you're using, so if you're getting a 401 it is because you are using an invalid client id. Please double check that the client id is the same as the one you are using when initializing the JavaScript SDK.

For example, the following works just fine using a client id of one of my test apps:

curl "https://api.soundcloud.com/tracks?q=track&client_id=aeb03ac55f278fc7e579c744144b1d5d

The order of the parameters in the querystring will have no effect on the response.

share|improve this answer

Your Answer


