3

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?

Adrien Joly
  • 5,056
  • 4
  • 28
  • 43

1 Answers1

8

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.

Matas Petrikas
  • 216
  • 1
  • 5
  • 3
    Noticed that a URL for a track I'm getting a 403 on works fine in another app (Slack, in this case). Is there anything about the client ID or "level" of the registered application that can affect whether or not the API returns a 403 for a given track/artist? – virtualandy Sep 18 '15 at 20:26