2

我正在尝试从我们的 Java Web 应用程序为 Mendeley API 设置 OAuth2 标准授权流程。以下 URL 被调用(我在这篇文章中删除了我的客户 ID):

https://api.mendeley.com/oauth/authorize?client_id=xxxx&response_type=code&redirect_uri=http%3A%2F%2Flocalhost%3A8080%2Fapp%2Fconnect%2Fmendeley&scope=all&state=887e0b43-b8e7-41b3-a120-6063e4bdfed3

但我收到一个错误:

{"error_message":"Redirection URI does not match the one registered for this application"}

我在 Mendeley 的“我的应用程序”页面中检查了这个重定向 URI,redirect_uri 值与页面中显示的字符串完全相同。请你告诉我这个 URL 是否有任何问题,或者编码是否应该不同?

感谢您的任何建议

理查德

4

1 回答 1

1

这是我的错误 - 我在 Mendeley 开发网页的 MyApplications 部分中转义了 URL。因此,您注册为回调的 URL 应该是逐字网站 URL - 只有在授权请求中发送的重定向 URL 请求参数应该被编码。

于 2015-12-01T09:27:32.423 回答