Hi Blaine,

Failing the validate the signature when getting a request token is pretty rare. As you said the fact this all works from other libraries seems to point to a library issue. The most helpful things to see in these cases are:

• The actual HTTP request and response that fails. By seeing the URL requested I can try and recreate the signature and find the mismatch. • The "signature base string" used to create the oauth_signature parameter. This usually requires adding some print statements to the oauth library you're using but can be really helpful.

If you can send the HTTP request and response (headers and bodies) that will be a good start. If you're not sure how to get them from your library I recommend using a debugging proxy like Charles [1].

Thanks;
 – Matt Sanford / @mzsanford
     Twitter Dev

[1] - http://www.charlesproxy.com/

On Jul 3, 2009, at 2:10 PM, Blaine Garrett wrote:


Hi,

I get the 401:Unauthorized Error every time I attempt to get a request
token. When I attempt to go to the URL directly in the browser (not
yet accessed to preserve nonce) I get a body of "Failed to validate
oauth signature and token".

I am using the Leah's oauth client listed at http://oauth.net/code
as well as the python-twitter (0.7-devel) and oauth-python-twitter
(v0.1)

I was able to get these same libraries to work on a different project
but not on the current one I am working on.
I have refreshed my tokens numerous times and also tried the working
ones from the other project. I also tried the tokens from this project
on the other project that was working and that WORKED.

As such, I am guessing it is an issue with my setup or some other lib
I am working with.
Both projects however have Python Versions  2.5.2 and should otherwise
be the same setups.

Domain the project is on is http://articulture.blainegarrett.com if
the matters for some odd reason.

Any thoughts?

Here is the code I am using to call the libs if it helps:
oauth_consumer = oauthtwitter.OAuthApi(consumer_token,
consumer_secret)
request_token = oauth_consumer.getRequestToken() # httplib exception
bubbles from within here
authorization_url = oauth_consumer.getAuthorizationURL(request_token)

Thank you!
~Blaine

--
Blaine Garrett
gchat :  bla...@jrcorps.com
aim: zombiediv
y!: zombiediv

Reply via email to