I had recently registered for the free level Twitter API, and I would like to use Tweepy to help me extract tweets from users.
api_key = config['twitter']['api_key']
api_secret = config['twitter']['api_key_secret']
access_token = config['twitter']['access_token']
access_token_secret = config['twitter']['access_token_secret']
auth = tweepy.OAuthHandler(api_key, api_secret)
auth.set_access_token(access_token, access_token_secret)
api = tweepy.API(auth)
tweets = api.home_timeline()
But after I ran it, the below error showed up:
Forbidden: 403 Forbidden 453 - You currently have access to a subset of Twitter API v2 endpoints and limited v1.1 endpoints (e.g. media post, oauth) only. If you need access to this endpoint, you may need a different access level. You can learn more here: https://developer.twitter.com/en/portal/product.
If I understand correctly, the Twitter API document did allow for free-level access. However, I am not sure why it does not work for me.
Does any professional know how to solve this issue?