title: Bad Authentication data error while getting list of followers in Python with Tweepy/Twython
body: <p>I'm doing it exactly the same way other SO user <a href="https://stackoverflow.com/questions/17455107/the-best-way-to-get-a-list-of-followers-in-python-with-tweepy">did</a> </p>
  
  <pre><code>for follower in api.followers_ids('twitter'):
      print api.get_user(follower).screen_name
  </code></pre>
  
  <p>But getting the following error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    File "/usr/local/lib/python2.7/dist-packages/tweepy/binder.py", line 185, in _call
      return method.execute()
    File "/usr/local/lib/python2.7/dist-packages/tweepy/binder.py", line 168, in execute
      raise TweepError(error_msg, resp)
  tweepy.error.TweepError: [{'message': 'Bad Authentication data', 'code': 215}]
  </code></pre>
  
  <p>Streaming working just find so I assume authentication process went normally. </p>
  
  <p>This problem is not limited to Tweepy, for example I've tried Twython</p>
  
  <pre><code>t = Twython(app_key=consumer_key,
              app_secret=consumer_secret,
              oauth_token=access_token,
              oauth_token_secret=access_token_secret)
  </code></pre>
  
  <p>And got very similar error:</p>
  
  <pre><code>  File "downloader.py", line 14, in &lt;module&gt;
      auth = t.get_authentication_tokens()
    File "/usr/local/lib/python2.7/dist-packages/twython/api.py", line 260, in get_authentication_tokens
      raise TwythonAuthError(response.content, error_code=response.status_code)
  twython.exceptions.TwythonAuthError: Twitter API returned a 401 (Unauthorized), Failed to validate oauth signature and token
  </code></pre>
  
  <p>I've triple checked my keys and tokens and sure they are allright. What is the root of the problem I'm experiencing? </p>
  
  <p>p.s. I think my problem is deeper. 
  I cannot get example code for Twython working. The following code:</p>
  
  <pre><code>t = Twython(app_key=consumer_key,
              app_secret=consumer_secret,
              oauth_token=access_token,
              oauth_token_secret=access_token_secret)
  
  try:
      search_results = t.search(q='WebsDotCom', count=50)
  except TwythonError as e:
      print e
  
  for tweet in search_results['statuses']:
      print 'Tweet from @%s Date: %s' % (tweet['user']['screen_name'].encode('utf-8'), tweet['created_at'])
      print tweet['text'].encode('utf-8'), '\n'
  </code></pre>
  
  <p>produces </p>
  
  <pre><code>  File "downloader.py", line 19, in &lt;module&gt;
      search_results = t.search(q='WebsDotCom', count=50)
    File "/usr/local/lib/python2.7/dist-packages/twython/endpoints.py", line 130, in search
      return self.get('search/tweets', params=params)
    File "/usr/local/lib/python2.7/dist-packages/twython/api.py", line 219, in get
      return self.request(endpoint, params=params, version=version)
    File "/usr/local/lib/python2.7/dist-packages/twython/api.py", line 213, in request
      content = self._request(url, method=method, params=params, api_call=url)
    File "/usr/local/lib/python2.7/dist-packages/twython/api.py", line 134, in _request
      response = func(url, **requests_args)
    File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 254, in get
      return self.request('get', url, **kwargs)
    File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 241, in request
      r.send(prefetch=prefetch)
    File "/usr/local/lib/python2.7/dist-packages/requests/models.py", line 521, in send
      r = self.auth(self)
    File "/usr/local/lib/python2.7/dist-packages/requests_oauthlib/core.py", line 58, in __call__
      if is_form_encoded or extract_params(r.body):
  AttributeError: 'Request' object has no attribute 'body'
  </code></pre>
  
  <p>I think it is somehow related to oauth, but updating requests_oauthlib haven't helped. </p>