I'm using the SoundCloud API resolve
method (which works most of the time)... but sometimes it returns a 403.
Here's my reduced test cast on JSFiddle --> https://jsfiddle.net/stursby/fcvce4f7/
And the source of the fiddle (please run in JSFiddle and check the console logs)
// setup
const API_BASE = 'https://api.soundcloud.com'
const CLIENT_ID = 'xxxxxxxxxxxxxxxxxxxxxxxxx'
// https://developers.soundcloud.com/docs/api/reference#resolve
const resolve = (url) => {
console.log(`resolving ${url} ...`)
axios.get(`${API_BASE}/resolve`, {
params: {
url: url,
client_id: CLIENT_ID
}
})
.then((response) => {
console.log(response.data)
})
.catch((error) => {
console.log('Error:', error)
})
}
// works
resolve('https://soundcloud.com/goodvibrationsradioshow/goodvibrations2')
// doesn't...
resolve('https://soundcloud.com/bingoplayers/hysteria-radio-056')