Reputation: 93
i want to download track from Soundcloud using Soundcloud SDK v3
<script src="https://connect.soundcloud.com/sdk/sdk-3.0.0.js"></script>
i retrive tracks from website normaly using this script (javascript)
SC.get('/tracks',{
original_format: 'mp3',
sharing: 'public',
streamable: true,
downloadable: true,
state: 'finished',
track_type: 'original'
}).then(function(tracks) {
var html = '';
$.each(tracks, function(index, track){
html += previewTrack(track);
});
$('#tracks-wrapper').append(html).hide().fadeIn();
$('.icon-refresh','#refresh-btn').removeClass('fa-spin');
});
my tracks playing fine, but i dont know how download them from soundcloud via API. For example i get this response from website when i play track using SDK.
attachments_uri: "https://api.soundcloud.com/tracks/259412502/attachments"
download_count: 0
download_url: "https://api.soundcloud.com/tracks/259412502/download"
downloadable: true
finally my problem is how i can download this track ..
if i use this download_url
on browser, its not working
Please help me..
sorry about my english..
Upvotes: 2
Views: 10924
Reputation: 712
You need to add your client id, otherwise you won't be authorized to download it. https://api.soundcloud.com/tracks/259412502/download?client_id=CLIENT_ID
Upvotes: 4