I'm getting a 401 constantly without further explanation of what the error is when posting to Tumblr via the v2 API.
Requests are below - linebreaks are added for readibility
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
I get the following response
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":[]}
Does anyone can spot why?
You can check your base string here
and you can check everything here
http://hueniverse.com/oauth/guide/authentication/
Also, personally I've had some trouble when my signature included a +, as yours does above, (+ = %2b urlencoded). I solved the problem by testing for the + in my signature and re-signing if it did.