【发布时间】:2015-07-07 11:19:22
【问题描述】:
我提出这个要求
https://www.amazon.com/ap/oa?client_id=amzn1.application-oa2-
clientxxxxxxxxxxxxxxxxxxxxxxxxx&scope=clouddrive%3Aread%20clouddrive%3
Awrite&response_type=code&redirect_uri=https://roscasend.go.ro:8443/
我已成功重定向到此页面
https://roscasend.go.ro:8443/?code=cccccccoooooodeeeeeee&scope=
clouddrive%3Aread+clouddrive%3Awrite
但是当从以下请求更新字段时
POST https://api.amazon.com/auth/o2/token HTTP/1.1
Host: api.amazon.com
Content-Type: application/x-www-form-urlencoded
Cache-Control: no-cache
//those are the post's request arguments
grant_type=authorization_code&code=cccccccoooooodeeeeeee
&client_id=amzn1.application-oa2-clientxxxxxxxxxxxxxxxxxxxxxxxxx&
client_secret=secret______________________&redirect_uri=
http%3A%2F%2Froscasend.go.ro%3A8443
使用我的凭据,我遇到了 400 错误。
你能给我任何关于如何更新上述请求以便工作的解决方案吗?
请注意,第一个请求是在浏览器中,第二个是通过 java。
【问题讨论】: