Search code examples
authenticationtwitteroauthexists

Check if twitter username exists


Is there a way to check if a twitter username exists? Without being authenticated with OAuth or the twitter basic authentication?


Solution

  • UPDATE: This API is not available since 2012.

    According to the api docs you can pass an email address to the user/ show method, I would assume that if a user didn't exist you'd get back a 404, which should allow you to determine whether or not the user exists.

    eg: http://twitter.com/users/[email protected]

    result if not exist :

    <?xml version="1.0" encoding="UTF-8"?> 
    <hash> 
      <request>/users/[email protected]</request> 
      <error>Not found</error> 
    </hash