0

关于为什么我在客户端的 Javascript 中收到“加载资源失败:服务器响应状态为 400(错误请求)”的任何想法?(client-id 被隐藏了,我有一个通过注册 Rdio 站点用于 Oauth2.0 应用程序)

索引.html:

 <script src="https://www.rdio.com/api/api.js?client_id=12345678"></script>

回复:

https://www.rdio.com/oauth2/authorize/auto?response_type=token&client_id=12345678&showSignup=true&redirect_uri=http%3A%2F%2Flocalhost%3A8080%2Fhelper.html%3Fclient_id%3D12345678

Failed to load resource: the server responded with a status of 400 (Bad Request)

约翰

4

1 回答 1

2

请求的响应文本https://www.rdio.com/oauth2/authorize/auto应显示错误。例如,从 shell 发出请求:

$ curl "https://www.rdio.com/oauth2/authorize/auto?response_type=token&client_id=12345678&showSignup=true&redirect_uri=http%3A%2F%2Flocalhost%3A8080%2Fhelper.html%3Fclient_id%3D1234567"

对于有效的客户端 ID,可能的响应可能是:

无效的redirect_uri

如果这是您收到的错误,似乎很可能要解决它,您需要将您的域添加到Rdio 应用程序设置redirect_uri中的重定向 URI 。

于 2015-08-12T00:01:51.173 回答