[twitter-dev] Re: 401 Unauthorized -- user_timeline -- using Numeric ID

2009-10-21 Thread Chad Etzel
If you try to pull a protected users' timeline w/o authentication then it will throw a 401. You can confirm whether a user id is valid by trying to call: http://twitter.com/users/show.xml?id={insert_id_here} users/show will throw a 404 on a non existent user. -Chad On Wed, Oct 21, 2009 at

[twitter-dev] Re: 401 Unauthorized -- user_timeline -- using Numeric ID

2009-10-21 Thread Ryan Rosario
Thanks for all of your help! At some point, the 401 error for User Not Found should be changed to a 404. The fix would make this type of fetch much more efficient, and save on the number of API calls. I adapted my code for what you suggested above, but I had to check for User Not Found which

[twitter-dev] Re: 401 Unauthorized -- user_timeline -- using Numeric ID

2009-10-20 Thread Chad Etzel
Hi Ryan, This sounds like a bug. Can you provide full HTTP request/response headers+body traces for some of these requests? (be sure to obscure the authentication header). Using curl -vvv would be good. -Chad On Tue, Oct 20, 2009 at 1:10 PM, Ryan Rosario uclamath...@gmail.com wrote: I have

[twitter-dev] Re: 401 Unauthorized -- user_timeline -- using Numeric ID

2009-10-20 Thread Ryan Rosario
Below are the responses. I tried various combinations of - uusername:pass -u=username:pass -u username:pass and each time got an authentication error. Without authentication [madhatter:~/Desktop] ryan% curl -vvv http://twitter.com/statuses/user_timeline.json\?user_id=1255997062\count=100 * About

[twitter-dev] Re: 401 Unauthorized -- user_timeline -- using Numeric ID

2009-10-20 Thread Dewald Pretorius
Apart from the 401 issue, the following is also very weird: X-experimental-RLS-remaining: 0 X-experimental-RLS-maxvalue: 150 X-RateLimit-Limit: 2 This is on the second authenticated call. On the unauthenticated call X-RateLimit-Limit was 150. I assume both calls were made from the same

[twitter-dev] Re: 401 Unauthorized -- user_timeline -- using Numeric ID

2009-10-20 Thread Ryan Rosario
Correct. I thought that was weird, but didn't know what to make of it. Same IP. The unauthenticated call was from an IP that is not whitelisted, so 150/hr. The second call was from the same IP, but authenticated as a whitelisted account, so should be 2/hr. I usually only work from the

[twitter-dev] Re: 401 Unauthorized -- user_timeline -- using Numeric ID

2009-10-20 Thread Chad Etzel
Hi Ryan, I think part of the problem is that user id 1255997062 does not exist, so it should really be returning a 404 instead of a 401. Do you get the same 401 result with a known valid user id? -Chad On Tue, Oct 20, 2009 at 3:13 PM, Ryan Rosario uclamath...@gmail.com wrote: Correct. I

[twitter-dev] Re: 401 Unauthorized -- user_timeline -- using Numeric ID

2009-10-20 Thread Ryan Rosario
I think I see what is happening now. After 15 users or so, I hit a user that no longer exists. On a 404, I skip the user, but on a 401, for the time being, I am retrying, and then maxing out my hourly limit. The other part was my overworked mind. I was pulling numbers that looked like Twitter

[twitter-dev] Re: 401 Unauthorized -- user_timeline -- using Numeric ID

2009-10-20 Thread Ryan Rosario
*bangs head on desk...again* Now that I know what what my Twitter ID is, and I know that I am a valid user, I tried it and it worked. It's gone way past 15 users now without a problem (without error checking). I see what is happening now. After 15 users or so, I hit a user that no longer