1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Tumblr API

Discussion in 'C, C++, C#' started by theMagicNumber, Mar 1, 2013.

  1. theMagicNumber

    theMagicNumber Regular Member

    Joined:
    May 13, 2010
    Messages:
    345
    Likes Received:
    195
    ~DELETED.
    Found the error. The post data should be used too when generating the OAuth signature.
     
    Last edited: Mar 1, 2013
  2. innozemec

    innozemec Jr. VIP Jr. VIP

    Joined:
    Aug 19, 2011
    Messages:
    5,288
    Likes Received:
    1,799
    Location:
    www.Indexification.com
    Home Page:
  3. theMagicNumber

    theMagicNumber Regular Member

    Joined:
    May 13, 2010
    Messages:
    345
    Likes Received:
    195
    The problem is the POST methods:
    Request:
    Code:
    POST http://api.tumblr.com/v2/blog/shittyblog123.tumblr.com/post HTTP/1.1
    Authorization: OAuth oauth_token="xfUIhxZmnu2JhueiEQlawfqBEQNS8BBOhBRztTqiWqIYP10O8X",oauth_consumer_key="XXXXXXXXXXX",oauth_nonce="HNGTawos",oauth_signature_method="HMAC-SHA1",oauth_signature="Ad%2BdLO%2FZFSi9g8VDtXOu%2BJMzvok%3D",oauth_version="1.0",oauth_timestamp="1362162218"
    Content-Type: application/x-www-form-urlencoded; charset=utf-8
    Host: api.tumblr.com
    Content-Length: 19
    Connection: Keep-Alive
    
    
    type=text&body=test
    
    Response:
    Code:
    {"meta":{"status":401,"msg":"Not Authorized"},"response":[]}
    The GET methods are working fine:
    Request:
    Code:
    GET http://api.tumblr.com/v2/blog/shittyblog123.tumblr.com/followers HTTP/1.1Authorization: OAuth oauth_token="xfUIhxZmnu2JhueiEQlawfqBEQNS8BBOhBRztTqiWqIYP10O8X",oauth_consumer_key="XXXXXXXXXXX",oauth_nonce="WrxiHyUl",oauth_signature_method="HMAC-SHA1",oauth_signature="pj2wTna1jb7kuvcgFAm9mpj069s%3D",oauth_version="1.0",oauth_timestamp="1362162481"
    Host: api.tumblr.com
    Connection: Keep-Alive
    Response:
    Code:
    {"meta":{"status":200,"msg":"OK"},"response":{"total_users":0,"users":[]}}
    
    I am using DotNetOpenAuth library.