JSFiddle - React, Tailwind, and code Playground

by Tobias Beuving

HTML

<script src="//connect.soundcloud.com/sdk.js"></script>
<body>
<ol id="track-list"></ol>
</body>

JavaScript

SC.initialize({
    client_id: "YOUR_CLIENT_ID",
    redirect_uri: "http://example.com/callback.html",
  });
/**
Once that's done you are all set and ready to call the SoundCloud API. For example getting the latest track of a group:
**/

SC.get("/tracks", {user_id: 39090345, limit: 100}, function(tracks){
    
    var tmp = '';
    
    for (var i=0;i<tracks.length;i++) {
        
        tmp = '<a href="'+tracks[i].permalink_url+'">'+tracks[i].title + ' - '+ tracks[i].duration+'</a>';
        
      $("<li/>").html(tmp).appendTo("#track-list");        
    }
  
});