1.1/users/lookup returns 404 error (code 34)


Hello. Trying to update user screen_names by their ids.

Making this request:

GET /1.1/users/lookup.json?user_id=182786667%2C331748636%2C564252072%2C1051974517%2C614303108%2C630098904%2C799316077%2C816115224%2C150598863%2C365333411%2C614277837%2C27578307%2C628176839%2C18050752%2C19999008%2C62502791%2C364630768%2C742856384%2C293398169%2C929689668%2C763981718%2C838233703%2C575801311%2C869195058%2C1070373817%2C597424670%2C566380847%2C234443231%2C358540413%2C572970095%2C615056519%2C615062564%2C398476939%2C718576592%2C263798152%2C722464112%2C547327808%2C706258333%2C439411079%2C587004175%2C465454336%2C371977368%2C165392548%2C495878065%2C797794728%2C1062920384%2C927526772%2C706112395%2C88242547%2C591884107%2C464447508%2C572953712%2C18975861%2C92483183%2C528807628%2C42191484%2C494852231%2C1091086453%2C34265837%2C997481568%2C1038306559%2C603965824%2C590479756%2C758776297%2C156939058%2C142191230%2C752342550%2C19525581%2C60358277%2C494874878%2C494871585%2C827072034%2C132594760%2C586289833%2C498954691%2C494861747%2C704659166%2C494864112%2C951821846%2C823733598%2C237227727%2C173513168%2C406186089%2C92014220%2C241938054%2C139480767%2C139145300%2C547943121%2C354815680%2C277871876%2C90635645%2C50367548%2C149720518%2C169510086%2C202865755%2C131437135%2C754743368%2C263032705%2C264786270%2C230752885 HTTP/1.1

Got 404 error.

Tried to reduce length of request and leave only one user id:

GET /1.1/users/lookup.json?user_id=182786667 HTTP/1.1

Got save error.

When making request with screen_names, all works great. By I have not screen_names - I trying to define it after /friends/ids.

Is there any solutions except using /users/show (it will use too many requests to API).


For the 2nd case, you get a 404 because there is no user with the ID “182786667”

For the first case, either all the users you are enumerating are non-existent OR perhaps you’re library is overly-encoding those commas and you’re actually sending one very long value to as the user_id


Yes, I found that user with ID 182786667 do not exists (but I’m sure I’ve imported this number with friends/ids).
But is it possible to get info about users, who exists, from all array of IDs? I send 100 ids and only one non-existent ID break all request, and I do not know, which ID break it.


I understand reason of error.

When I send to API 100 ids, it returns all found users. If 1 of user do not exists, it returns array of 99 users.

And yes, there are only not-existent users in my queue and twitter return not an empty array, but 404 error page. It is not very clear, but OK, I found what to do next. Thanks for this:

“either all the users you are enumerating are non-existent”