2016-04-16 57 views
1

我想使用的SoundCloud SDK V3從SoundCloud下載曲目如何使用Soundcloud API下載音軌?

<script src="https://connect.soundcloud.com/sdk/sdk-3.0.0.js"></script> 

我retrive normaly使用這個腳本(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'); 
}); 

我的軌道精打,但我不知道如何下載從網站上軌他們從soundcloud通過API。 例如,當我使用SDK播放曲目時,我從網站得到了這個響應。

attachments_uri: "https://api.soundcloud.com/tracks/259412502/attachments" 
download_count: 0 
download_url: "https://api.soundcloud.com/tracks/259412502/download" 
downloadable: true 

終於我的問題是如何,我可以下載這首歌.. 如果我在瀏覽器中使用此download_url,它不工作

請幫助我..

我的英語抱歉..

+1

如果我在瀏覽器中輸入download_url,它會顯示:{「errors」:[{「error_message」:「401 - Unauthorized」}]} - 該軌道是否公開? –

+1

你需要api密鑰才能到達 – JordanHendrix

+0

對不起...我有api密鑰 –

回答

相關問題