Soundcloud's oEmbed endpoint returns 403 on some URLs

℡╲_俬逩灬. 提交于 2019-12-23 18:36:19

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/9079862/soundclouds-oembed-endpoint-returns-403-on-some-urls

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!