Soundcloud: How do I know the sound cloud track ID right away after uploading a track?

slee picture slee · Sep 20, 2013 · Viewed 34.7k times · Source

http://developers.soundcloud.com/docs/api

When I look at the API docs, I see

 SC.stream("/tracks/293", function(sound){
      sound.play();
 });

When I look at the track I uploaded, it only provides me the permalink. How do I get the track ID from the website? Do I always have to do a /resolve to get the ID?

Answer

scott_ri picture scott_ri · Dec 14, 2013

This is probably more manual steps than /resolve, but it is "from the website." The sound id also appears in the embed code when you go to the sound and click "Share".

For example, if you go to a sound page, e.g.:

https://soundcloud.com/lowcountrykingdom/another-ordinary-day

Then click "Share", which brings up a pop up. Click "Embed" to switch to the embed tab, and copy the Embed code, which will look something like:

<iframe width="100%" height="166" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/47580057&amp;color=ff6600&amp;auto_play=false&amp;show_artwork=true"></iframe>

Note the ID in the value of the url query parameter:

url=https%3A//api.soundcloud.com/tracks/47580057