Note that there are some explanatory texts on larger screens.

plurals
  1. POTumblr OAuth image post gives me 401/"Invalid OAuth credentials"
    primarykey
    data
    text
    <p>I've got an iOS app thats posts images to several services, including twitter and I'm trying to extend that support to tumblr. I've adapted some open source code for the OAuth 1.0a header logic and its working well enough to be successful for twitter + twitpic and for tumblr's authentication. However image posts to tumblr are failing with status 401 and string response "Invalid OAuth credentials"</p> <p>To simplify, my only multipart sections are the post type and the image data.</p> <p>So my simple POST is to <a href="http://www.tumblr.com/api/write" rel="nofollow">http://www.tumblr.com/api/write</a>, the signature base string is (roughly, as I’ve redacted my consumer key and token, and linebreaks added for readability):</p> <pre><code>POST&amp;http%3A%2F%2Fwww.tumblr.com%2Fapi%2Fwrite&amp; oauth_consumer_key%3Dxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx%26 oauth_nonce%3D71edd7a1224463a7e1723bb7b568060b4d69deb6%26 oauth_signature_method%3DHMAC-SHA1%26 oauth_timestamp%3D1297678418%26 oauth_token%3Dxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx%26 oauth_version%3D1.0%26 type%3Dphoto </code></pre> <p>my oauth header is (again, linebreaks added here for readability):</p> <pre><code>Authorization: OAuth realm="http://www.tumblr.com/", oauth_consumer_key="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1296445530", oauth_nonce="71edd7a1224463a7e1723bb7b568060b4d69deb6", oauth_version="1.0", oauth_token="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", oauth_signature="fWuli4eO3qVehfdeFzZN%2FDNYpFk%3D" </code></pre> <p>the only other headers I’m adding are Content-Type (multipart/form-data) &amp; Content-Length, and the message body is just:</p> <pre><code>--my_sorta_unique_boundary_string Content-Disposition: form-data; name="type" photo --my_sorta_unique_boundary_string Content-Disposition: form-data; name="data" Content-Type: image/jpg Content-Transfer-Encoding: binary ... (image data) ... --my_sorta_unique_boundary_string-- </code></pre> <p>Can anyone tell me if I’ve done something wrong with my signature base string or auth header, or if there's some trick for getting tumblr oauth posts to work?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload