LaurenLai
LaurenLai

Reputation: 209

403 Forbidden 453 - You currently have access to a subset of Twitter API v2 endpoints and limited v1.1 endpoints only

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?

Upvotes: 19

Views: 30710

Answers (1)

Futurist Forever
Futurist Forever

Reputation: 516

You cannot use the Search Tweets feature using the Free Level Access on the Twitter API.

You can use the Manage Tweets and User Lookup features on Free Level Access.

For the Search Tweets feature, you have to upgrade to the Basic Level.

For more information:

https://developer.twitter.com/en/docs/twitter-api

Upvotes: 17

Related Questions