title: I would like to check the status of a list of twitter user ids
body: <p>As stated in the question, I would like to check the status of a list of twitter user ids. I had about 20k twitter users. I was able to get the timelines of about half of them. The other have are probably either suspended, deactivated, or have 0 tweets. I found this script online that supposedly allow for checking the status of a twitter user. Here is the script (<a href="https://github.com/dbrgn/Twitter-User-Checker/blob/master/checkuser.py" rel="nofollow noreferrer">https://github.com/dbrgn/Twitter-User-Checker/blob/master/checkuser.py</a>):
  `</p>
  
  <pre><code>#!/usr/bin/env python2
  
  # Twitter User Checker
  # Author: Danilo Bargen
  # License: GPLv3
  
  import sys
  import tweepy
  import urllib2
  try:
      import json
  except ImportError:
      import simplejson as json
  from datetime import datetime
  
  auth = tweepy.AppAuthHandler("xxx", "xxxx")
  
  api = tweepy.API(auth, wait_on_rate_limit=True, wait_on_rate_limit_notify=True)
  
  if (not api):
      print ("Can't Authenticate")
      sys.exit(-1)
  
  # Continue with rest of code
  
  
  try:
      user = sys.argv[1]
  except IndexError:
      print 'Usage: checkuser.py [username]'
      sys.exit(-1)
  
  url = 'https://api.twitter.com/1.1/users/show.json?id=%s' % user
  
  try:
      request = urllib2.urlopen(url)
      status = request.code
      data = request.read()
  except urllib2.HTTPError, e:
      status = e.code
      data = e.read()
  
  data = json.loads(data)
  
  print data
  
  if status == 403:
       print "helloooooooo"
  #    if 'suspended' in data['error']:
  #        print 'User %s has been suspended' % user
  #    else:
  #        print 'Unknown response'
  elif status == 404:
      print 'User %s not found' % user
  elif status == 200:
      days_active = (datetime.now() - datetime.strptime(data['created_at'],
                     '%a %b %d %H:%M:%S +0000 %Y')).days
      print 'User %s is active and has posted %s tweets in %s days' % \
               (user, data['statuses_count'], days_active)
  else:
      print 'Unknown response'
  </code></pre>
  
  <p>`</p>
  
  <p>I get the following error: 
  <code>File "twitter_status_checker.py", line 16, in &lt;module&gt;
      auth = tweepy.AppAuthHandler("xxx", "xxxx")
    File "/Users/aloush/anaconda/lib/python2.7/site-packages/tweepy/auth.py", line 170, in __init__
      'but got %s instead' % data.get('token_type'))
  tweepy.error.TweepError: Expected token_type to equal "bearer", but got None instead</code></p>
  
  <p>Could anyone help me fix the error as well as allow the script to check for a list of users rather than one user for each run. </p>
  
  <p>Here is a list of the HTTP Status Codes I would like to check for: <a href="https://dev.twitter.com/overview/api/response-codes" rel="nofollow noreferrer">https://dev.twitter.com/overview/api/response-codes</a></p>
  
  <p>Thank you. </p>