Support Staff6 Posted by Micah on 03 Jun, 2012 04:27 PM
It's very frustrating. I can work with the API normally in
development, but I get a 401 Unauthorized error when requesting
tokens from the staging server.
The worst part is not knowing if it's a problem with my client
or with the provider. All our API specs pass, including those
related to the request token workflow. But none of that matters as
long as the actual API won't respond....
I am pretty sure it is with the provider. I've got a couple of apps that work until I change the urls in lib/client.rb, in mage-hand, to point to the staging server. No other code or configuration changes, same version of ruby (1.8.7 and 1.9.3 exhibit the issue). One of the apps is a command like app using Thor so it doesn't seem to be rails in the client.
Support Staff8 Posted by Micah on 03 Jun, 2012 06:10 PM
Yeah, I'm thinking it's with the provider as well. I've narrowed
it down to the signature verification in the OAuth Rack middleware.
My gut feeling is that it has something to do with the body_hash.
I've had problems with that in the past, but I can't remember exact
what or why.