Javascript Rdio API 出现 400 错误

400 Error with Javascript Rdio API

关于为什么我在客户端的 Javascript 中得到 "Failed to load resource: the server responded with a status of 400 (Bad Request)" 有什么想法吗? (客户端 ID 模糊,我有一个用于 Oauth2.0 应用程序的注册 Rdio 站点)

index.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)

约翰

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,可能的响应可能是:

Invalid redirect_uri

如果这是您收到的错误(这似乎很可能),要解决它,您需要将 redirect_uri 的域添加到 your Rdio application's settings 中的重定向 URI。