[twitter-dev] users/lookup and OAuthed Signed requests

2010-04-12 Thread ryan baldwin
I'm having a heck of a time getting the users/lookup to work. I keep
getting an invalid signature response, however if I try hitting
other urls that require authentication (such as statuses/
home_timeline) I get the proper response.

The only difference that I can see is that the users/lookup requires a
comma separated screen_name param. An example of a call I'm making is
as follows:

http://api.twitter.com/1/users/lookup.json?screen_name=Ditton,THEO_BROWN,jeff_phillipsoauth_consumer_key=[WITHHELD]oauth_nonce=3702675319114583140oauth_signature=Bjm61%2F0dNQ1YY%2B6DZrKfluh3brk%3Doauth_signature_method=HMAC-SHA1oauth_timestamp=1271088234oauth_token=[WITHHELD]oauth_version=1.0

The above produces a 401.  I though perhaps it's because the commas
need to be encoded (however the examples I've seen that doesn't seem
to be the case). Even if I tried sending up only 1 screen_name,
however, it still fails with a 401.

http://api.twitter.com/1/users/lookup.json?screen_name=Dittonoauth_consumer_key=[WITHHELD]oauth_nonce=12427699099383609456oauth_signature=gKSz6qPOiPKrJX6NqLuP7HjBkJ4%3Doauth_signature_method=HMAC-SHA1oauth_timestamp=1271088019oauth_token=[WITHHELD]oauth_version=1.0

Like I said, if I hit up the statuses/home_timeline endpoint it works
fine.
http://api.twitter.com/1/statuses/home_timeline.json?oauth_consumer_key=[WITHHELD]oauth_nonce=4782314729649271771oauth_signature=LGfzsFEyzfHOszTPx1GPSzj%2BTN8%3Doauth_signature_method=HMAC-SHA1oauth_timestamp=1271086839oauth_token=[WITHHELD]oauth_version=1.0

Anybody have any idears?

Thanks!


Re: [twitter-dev] users/lookup and OAuthed Signed requests

2010-04-12 Thread ryan baldwin
That's the link I was looking for. Will play around and figure some of this
stuff out. Thanks Raffi!

- ryan.


On Mon, Apr 12, 2010 at 10:14 AM, Raffi Krikorian ra...@twitter.com wrote:

 creating oauth signatures is annoyingly subtle, isn't it?  i would suggest
 playing with


 http://hueniverse.com/2008/10/beginners-guide-to-oauth-part-iv-signing-requests/


 http://hueniverse.com/2008/10/beginners-guide-to-oauth-part-iv-signing-requests/and
 verifying the signature base string and signature you're generating to what
 that emits.


 On Mon, Apr 12, 2010 at 9:10 AM, ryan baldwin ryanbald...@gmail.comwrote:

 I'm having a heck of a time getting the users/lookup to work. I keep
 getting an invalid signature response, however if I try hitting
 other urls that require authentication (such as statuses/
 home_timeline) I get the proper response.

 The only difference that I can see is that the users/lookup requires a
 comma separated screen_name param. An example of a call I'm making is
 as follows:


 http://api.twitter.com/1/users/lookup.json?screen_name=Ditton,THEO_BROWN,jeff_phillipsoauth_consumer_key=[WITHHELD]oauth_nonce=3702675319114583140oauth_signature=Bjm61%2F0dNQ1YY%2B6DZrKfluh3brk%3Doauth_signature_method=HMAC-SHA1oauth_timestamp=1271088234oauth_token=[WITHHELD]oauth_version=1.0

 The above produces a 401.  I though perhaps it's because the commas
 need to be encoded (however the examples I've seen that doesn't seem
 to be the case). Even if I tried sending up only 1 screen_name,
 however, it still fails with a 401.


 http://api.twitter.com/1/users/lookup.json?screen_name=Dittonoauth_consumer_key=[WITHHELD]oauth_nonce=12427699099383609456oauth_signature=gKSz6qPOiPKrJX6NqLuP7HjBkJ4%3Doauth_signature_method=HMAC-SHA1oauth_timestamp=1271088019oauth_token=[WITHHELD]oauth_version=1.0

 Like I said, if I hit up the statuses/home_timeline endpoint it works
 fine.

 http://api.twitter.com/1/statuses/home_timeline.json?oauth_consumer_key=[WITHHELD]oauth_nonce=4782314729649271771oauth_signature=LGfzsFEyzfHOszTPx1GPSzj%2BTN8%3Doauth_signature_method=HMAC-SHA1oauth_timestamp=1271086839oauth_token=[WITHHELD]oauth_version=1.0

 Anybody have any idears?

 Thanks!




 --
 Raffi Krikorian
 Twitter Platform Team
 http://twitter.com/raffi



-- 
To unsubscribe, reply using remove me as the subject.