Parisian Eye
Parisian Eye

Reputation: 31

Twitter Rest API call lookup.json always gives a code 17 error

This call:

curl --get \
     --silent 'https://api.twitter.com/1.1/users/lookup.json?user_id=124687887&include_entities=false' \
     --header 'Authorization: OAuth
                 oauth_consumer_key="xxxxxxxxx", 
                 oauth_nonce="xxxxxxxxxx",
                 oauth_signature="xxxxxxxxxxx", 
                 oauth_signature_method="HMAC-SHA1", 
                 oauth_timestamp="1429869142",
                 oauth_token="xxxxxxxxxxxxxxxxxxxxxxxxxx",
                 oauth_version="1.0"`

systematically returns:

{"errors":
  [{
    "code": 17,
    "message": "No user matches for specified terms."
  }]
}

This used to worked just fine for weeks. I had to modify a bit my tool, and made a mistake that made my tool calling this API call too often (regarding rates). Since then I'm stuck with this error, while all other API calls continue to work.

Upvotes: 3

Views: 1727

Answers (2)

mike
mike

Reputation: 187

Probably there is nothing wrong with your call. The problem seems to be that the user_id you are looking for is removed from twitter.

I made a call with a client that was successful for all other ids except that one.

Did you try your call with a user_id that you know it exists. For example try Gap twitter handle here's their user_id 18462157

Upvotes: 1

Yuva Raj
Yuva Raj

Reputation: 3881

I believe you might made a mistake here

user_id=124687887

Because, the error clearly says,

"message": "No user matches for specified terms."

Try replacing screen_name in the place of 124687887.

Upvotes: 0

Related Questions