Soundcloud API Error NS_ERROR_DOM_BAD_URI: Access to restricted URI denied (JavaScript)

雨燕双飞 提交于 2019-12-04 22:27:15

The problem here is that when connecting to an API which is being hosted on another server, you must be using the same protocol. For local files, you use the file protocol (file://), wheres soundcloud uses: http:// or https://

Follow these steps:

  1. Get a server (XAMPP/LAMPP/WAMPP for PHP/Regular HTML, NodeJS for JS server, or Tornado for Python)
  2. Find the protocol which your server uses

If you server uses the http protocol, then your domain must be http://soundcloud.com/..., but if your server uses the https protocol, then the domain for the API must be https://..... So once you get the protocols to match, then you will be able to pass data through the API.

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