【发布时间】:2014-06-05 01:14:13
【问题描述】:
我正在尝试使用 Pocket API 构建一个简单的脚本,并且在遵循 site 上的文档时收到 400 错误请求。这是我得到的:
POST /v3/oauth/request?consumer_key=xxxxxx-
xxxxxxxxxxxxxxxxxxx&redirect_uri=http://localhost:3000/callback HTTP/1.1
Host: getpocket.com
Cache-Control: no-cache
Content-Type: application/x-www-form-urlencoded
我正在使用 Postman,并且正在从 rails 服务器运行 redirect_uri。
附加信息:
Cache-Control →private
Connection →keep-alive
Content-Length →15
Content-Type →text/html; charset=UTF-8
Date →Mon, 21 Apr 2014 01:17:05 GMT
Expires →Thu, 19 Nov 1981 08:52:00 GMT
P3P →policyref="/w3c/p3p.xml", CP="ALL CURa ADMa DEVa OUR IND UNI COM NAV INT STA PRE"
Pragma →no-cache
Server →Apache
Status →400 Bad Request
X-Error →Missing consumer key.
X-Error-Code →138
X-Source →Pocket
在搜索给我 400 的 x 错误代码时,我发现它给了我一个丢失的消费者密钥。我很茫然,因为这是一个全新的密钥,我当然正确地使用它。有什么想法吗?
【问题讨论】:
标签: ruby api post ruby-on-rails-4 oauth