问题
I noticed this issue has been reported in the past a lot, but it appears no one of the SoundCloud support team actually has been able to address the issue.
Ever since this week, SoundCloud API URLs are timing out followed by a 403 error when requested again.
For example, the following URL will return an empty page, and then a 403 error when refreshed: https://api.soundcloud.com/tracks/256202279?client_id=[CLIENT_ID]
This URL does work: https://api.soundcloud.com/tracks/256299992.json?client_id=[CLIENT_ID]
Update: As of 5/25/2016, the issue is still not fixed and SoundCloud has yet to reply with a satisfactory response.
回答1:
Update: As of 5/25/2016, the issue is still not fixed and SoundCloud has yet to reply with a satisfactory response. They're saying that right holders have the option to disable API requests, but every time I ask if they can show me a screenshot or anything at all that proves this behavior is intentional, their helpdesk no longer replies.
SoundCloud emailed back saying they have introduced an option for right holders to disable all API access to tracks by default, returning this 403 error when requested. They also said it's understandable that this is a confusing feature, and that they hope to make it more clear.
SoundCloud: please let applications read basic track information. Blocking access from simple information such as track ID breaks so many applications that use your API. It doesn't make any sense to block access to applications from retrieving a simple ID, title, or duration.
Also, most users who have tracks that are blocking API access have no idea about configuring this, so I'm still fairly convinced this is a bug in the SoundCloud API.
回答2:
I think about a quota, or a kind of blacklist... Because I had this error from one server, and when I tried from another (to change IP), the request si OK...
回答3:
Not the perfect solution, just a workaround...
Using the client side SoundCloud Widget API you'll be able to load the track in iframe, then get info with getCurrentSound method.
//javascript code sample...
var widget= SC.Widget(iframe);
widget.getCurrentSound(
function(infos){
console.log(infos);
}
);
Testing on https://w.soundcloud.com/player/api_playground.html with https://api.soundcloud.com/tracks/256202279 (and many others unresolved API urls) it works.
Not the perfect solution, I know...
来源:https://stackoverflow.com/questions/36360202/soundcloud-api-urls-timing-out-and-then-returning-error-403-on-about-50-of-trac