views:

20

answers:

1

I am trying to retrieve someone's profile, but it throws me a 401. I am pretty puzzled, since it works for quite a few people, but fails for others

401 Not Authorized error: Unauthorized:

This leads to a very poor UX. Any ideas?

+1  A: 

I've encountered this in the past because the REST API (you don't specify which you're using) returns profiles that are protected in its results. If you simply iterate through them you might end up doing an operation that you can't do without being allowed to see their protected tweets/profile.

Rushyo
the weird thing is that it fails for people like this: ODonoghueSteve, but this guy's profile is not protected. hmmm
ming yeow
Hmm, could you tell us which API you are using?
Rushyo

related questions