Search code examples
soundcloudoembed

Soundcloud's oEmbed endpoint returns 403 on some URLs


Soundcloud's oEmbed endpoint works well with most links (e.g. affee), but returns a 403 status with the following (valid) URL: knifepartyinc

What is wrong with the second URL?


Solution

  • the owner of the track on SoundCloud can choose to disable all widgets. It's one of the big checkboxes on the track edit page. In such case oEmbed wouldn't be able to return an embed code. Your application should have a defensive approach to handle this. Just check if the response is true before rendering it in the DOM.