Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Etsy.access_token 500's in :sandbox #25

Closed
plainlystated opened this issue Feb 25, 2012 · 4 comments
Closed

Etsy.access_token 500's in :sandbox #25

plainlystated opened this issue Feb 25, 2012 · 4 comments

Comments

@plainlystated
Copy link
Collaborator

I'm trying to get OAuth set up per the instructions in the README, but when I get to:

access = Etsy.access_token(request.token, request.secret, 'my_verification_code')

I get a a 500. I have tried with ruby 1.9.2 and 1.8.7. I am using the latest github version.

1.8.7 :003 > access = Etsy.access_token(request.token, request.secret, "1fac4eee")
Net::HTTPFatalError: 500 "Server Error"
from /Users/rellik/.rvm/rubies/ruby-1.8.7-p357/lib/ruby/1.8/net/http.rb:2105:in error!' from /Users/rellik/.rvm/gems/ruby-1.8.7-p357@etsy/gems/oauth-0.4.5/lib/oauth/consumer.rb:221:intoken_request'
from /Users/rellik/.rvm/gems/ruby-1.8.7-p357@etsy/gems/oauth-0.4.5/lib/oauth/tokens/request_token.rb:18:in get_access_token' from ./lib/etsy/secure_client.rb:55:inclient_from_request_data'
from ./lib/etsy/secure_client.rb:63:in client' from ./lib/etsy.rb:133:inaccess_token'
from (irb):3

@plainlystated
Copy link
Collaborator Author

Update: It works fine with the instructions from the web application (switching .request_token and .verification_url around)

@plainlystated
Copy link
Collaborator Author

Not sure if it was clear from my follow-up post, but the instructions in the README are broken. There are two descriptions given for setting up OAuth. The first (console) was giving 500's. I was able to get the webapp instructions to work (from the console), but never got the first set of instructions to work. Either the README or the code is busted, it seems.

@kytrinyx
Copy link
Collaborator

Ah, from your follow-up it sounded like you had reversed the arguments locally. I'll fix the readme. Thanks for the heads up.

@kytrinyx kytrinyx reopened this Feb 25, 2012
@kytrinyx
Copy link
Collaborator

You were right. The instructions had reversed two lines.

Every time a new request token is generated, any previous tokens for that session become invalidated, so the verification_url has to be generated after the request token.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants