【发布时间】:2011-08-06 06:31:47
【问题描述】:
当我通过 v2 API 发布到 Tumblr 时,我不断收到 401,但没有进一步解释错误是什么。
请求如下 - 添加换行符以提高可读性
POST http://api.tumblr.com/v2/blog/[blog].tumblr.com/post HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Host: api.tumblr.com
Content-Length: 303
body=test&
oauth_consumer_key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&
oauth_nonce=4712451&
oauth_signature_method=HMAC-SHA1&
oauth_timestamp=1312610497&
oauth_token=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&
oauth_version=1.0&
type=text&
oauth_signature=ccN%2f0E%2bat42BAzdkDPJ%2ffcuMacY%3d
我收到以下回复
HTTP/1.1 401 Not Authorized
Date: Sat, 06 Aug 2011 06:01:43 GMT
Server: Apache
P3P: CP="ALL ADM DEV PSAi COM OUR OTRo STP IND ONL"
Vary: Accept-Encoding
X-Tumblr-Usec: D=38791
Content-Length: 60
Connection: close
Content-Type: application/json
{"meta":{"status":401,"msg":"Not Authorized"},"response":[]}
有谁知道为什么?
【问题讨论】:
-
我通过提供非空白 tumblr 秘密解决了这个问题 - stackoverflow.com/questions/4849819/…
标签: tumblr