Total newb to using Tweepy... please help!


Hello! I am trying to develop a Twitter app using Python 2.7. I have absolutely no experience with Twitter development, and thus I’ve been trying to use online tutorials and resources to learn. I heard that Tweepy was really good, and so I downloaded Tweepy for Python 2.7 from

and I’ve been trying to use the tutorial on

However, when I type in…

import tweepy
public_tweets = tweepy.api.public_timeline()
for tweet in public_tweets:
    print tweet.text</code>

...into a new Python file, I get an error:

Traceback (most recent call last):
File “C:/Users/Me/Desktop/”, line 3, in
public_tweets = tweepy.api.public_timeline()
File “C:/Users/Me/Desktop\tweepy\”, line 185, in _call
return method.execute()
File “C:/Users/Me/Desktop\tweepy\”, line 168, in execute
raise TweepError(error_msg, resp)
TweepError: Twitter error response: status code = 403

From what I looked up, error 403 is “Forbidden.” I don’t really know what that means or how to fix that.

Could someone please help me? I would really appreciate it!


I guess you didn’t authentificate in the script? You try to get the tweets but you can’t. Did you use:


This is the best guess I can make as a total newb myself. Hope it helped.