SoundCloud API jQuery plugin
JavaScript HTML
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


jQuery plugin: SoundCloud oAuth 2.0 API wrapper

A simple usage example

First and most important, you'll need to get a Client ID from SoundCloud. If you haven't got one already, just register an app on the SoundCloud Apps page.

Include the plugin in your HTML code:

<script type="text/javascript" charset="utf-8" src="scripts/"></script>

and then, initialize it:

var api = $.sc.api('Enter your Client ID here');

or handle the successful authorization yourself:

var api = $.sc.api('Enter your Client ID here', {
  onAuthSuccess: function(user, container) {
    alert('you are SoundCloud user ' + user.username);

also instead of passing the callbacks you can use the custom events:

var api = $.sc.api('Enter your Client ID here');
$(document).bind($, function(event) {
  var user = event.user;
  // do something with the user object or call the api
  api.get('/me/tracks', function(tracks) {

Please refer to the wiki for full documentation.