mwunsch / tumblr

Command line interface and Ruby client for the Tumblr API (v2)
MIT License
282 stars 43 forks source link

tumblr authorize failure - probably dumb #33

Closed djwaix closed 11 years ago

djwaix commented 11 years ago

I just can't figure this out. There's not much documentation for the tumblr authorize; and, I admit, sounds easy! But, frankly, I have no idea what to do on the tumblr site for requesting an app...this is probably where the trouble begins. ...I put in (presumably) useless data: appname: my name callback url: what goes here? I get these keys (Oauth consumer key and secret key) and put them in the application respectively. It returns oauth_signature [STRING OF CHARS] does not match expected value [ANOTHER STRING OF CHARS The tumblr app then hangs, must close terminal completely and start a new session to attempt again.

kristianfreeman commented 11 years ago

Can you post a dump of your command-line output formatted in markdown? Obviously remove any OAuth info, etc. Has anything appeared in your ~/.tumblr file? That's where auth information is stored for the gem.

mwunsch commented 11 years ago

@thadeej, when you say

It returns oauth_signature [STRING OF CHARS] does not match expected value [ANOTHER STRING OF CHARS

Where does it say this? In the browser or in the terminal?

The tumblr app then hangs, must close terminal completely and start a new session to attempt again.

My suspicion is that the app is not hanging, it just received an error from Tumblr. Have you tried pressing CTRL-C back in the terminal where you started "authorize"?

As @imkmf alluded to, more information is necessary to understand why you're seeing this error.

djwaix commented 11 years ago

@mwunsch Re: This error: oauth_signature [STRING OF CHARS] does not match expected value [ANOTHER STRING OF CHARS This is returned in the browser when I input the oauth keys Re: terminal hang I can ctrl-z to quit but I cannot run tumblr authorize again unless I kill terminal or start a new session

@lmkmf I wish I knew how to do what you're asking. Since the process hangs, I must terminate it and no text file is created when I try to output one. Also, at no point has a ~/.tumblr file been generated. I created a blank one myself to see if that would help; no change.

Attaching screenshots:

Screen Shot 2013-04-26 at 2 14 54 PM -this time I ran it with sudo, but I normally don't try that...it "hangs" and the following is displayed in the browser:

Screen Shot 2013-04-26 at 2 09 57 PM --The string of chars changes each time I try this and do not seem to correspond to the oauth keys so I do not know what they mean.

mwunsch commented 11 years ago

I'm assuming you're copying and pasting your consumer key and secret. Make sure there's no whitespace. I'm going to work on making it easier to understand what's happening (this error message comes directly from tumblr's api), and I'll see what I can do to reproduce.

djwaix commented 11 years ago

@mwunsch Correct; copy and paste. Verified no whitespace. I did notice that this was calling the "wrong" version of ruby; corrected that in my ~/.bashrc but the same issue persists. Thanks for all the help. I can't wait to use this because I love emacs and org-mode for my daily productivity, so it would be great to plug-in tumblr to that system.

mwunsch commented 11 years ago

Investigating your log a bit more shows that you are not making it through the initial request token phase of the oauth handshake. What's supposed to happen is that when you make the request with the consumer key and secret, you should be redirected (a 302) to the callback url for the next stage (for the access token). You're not getting that far, you're getting a 401 access denied from Tumblr's API.

Have you attempted this with a different consumer key/secret pair? Register an additional one here http://www.tumblr.com/oauth/apps and let's see if we can reproduce with another key/secret. You can leave the callback url blank.

djwaix commented 11 years ago

New oauth/secret key works perfectly! Just as a side note: callback url cannot be left blank, but that's not your issue. :+1: Thanks for the patience and help! Now I can start using this!

mwunsch commented 11 years ago

Good to note about callback url; in either case, tumblr authorize will override that.

Happy to hear it works, though a bit concerned why your first key/secret pair didn't, but I guess that's on Tumblr. Happy tumblring!