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

1

19

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?

Pedi answered 22/6, 2023 at 4:30 Comment(2)
The "free" 2.0 API only allows you CREATE tweets. It does not allow you to make any queries. developer.twitter.com/en/docs/twitter-apiBackside
@TimRoberts, I was previously able to create tweets. Now I am unable to create tweets...Cremona
V
16

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

Vigesimal answered 23/6, 2023 at 7:11 Comment(5)
hello bro, I have one question, If I want to check whether user had followed another user, How I can do that with What Level access?Orphrey
@NhutPham Post it as a question.Vigesimal
How to fix 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?Vigesimal
@FuturistForever How can I list my own tweets?Norinenorita
@Norinenorita Refer https://docs.tweepy.org/en/stable/client.html#tweepy.Client.get_users_tweets https://developer.twitter.com/en/docs/twitter-api/tweets/timelines/api-reference/get-users-id-tweetsVigesimal

© 2022 - 2025 — McMap. All rights reserved.