Get Soundcloud URL for a track using only its ID

前端 未结 3 1793
不知归路
不知归路 2021-01-03 03:02

I\'ve inherited a database of Soundcloud IDs and would like to build a page linking to each track on Soundcloud. Is it possible to link to a track on the Soundcloud website

3条回答
  •  甜味超标
    2021-01-03 03:49

    First you will need to register an app at https://soundcloud.com/you/apps.

    Then use the API to return a JSON object of the track using the track ID and your client ID.

    e.g. (using jQuery) …

    $.ajax({ url: "http://api.soundcloud.com/playlists/405726.json?client_id=XXXX", type: 'GET', success: function (data) { console.log(data); } });

    Where XXX is your Client ID.

提交回复
热议问题