-
I am getting "Stream encountered HTTP error: 403" when using the above code. I am using tweepy 4.8.0 and python 3.9.10 on Mac OS. Is anyone experiencing the same errors or have any ideas for making the stream work? |
Beta Was this translation helpful? Give feedback.
Replies: 11 comments 7 replies
-
I was also getting the same error while using |
Beta Was this translation helpful? Give feedback.
-
Are you using a Twitter Developer App created on or after last Friday (2022-04-29)? |
Beta Was this translation helpful? Give feedback.
-
Yes! I just created the app yesterday! |
Beta Was this translation helpful? Give feedback.
-
Could you share some of your code? |
Beta Was this translation helpful? Give feedback.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
-
New Apps:
You'll have to use Twitter API v2. |
Beta Was this translation helpful? Give feedback.
-
I have the same problem as you: my permissions are also enabled. Then it is too outrageous to not use 403, and the version is also 4.8.0 |
Beta Was this translation helpful? Give feedback.
-
I have enabled both 2.0 and 1.0a. Then I used auth = tweepy.OAuth1UserHandler(
consumer_key, consumer_secret, access_token, access_token_secret
)
api = tweepy.API(auth)
class ConnectionTester(tweepy.StreamingClient):
def on_tweet(self, tweet: tweepy.Tweet):
id = tweet.id
api.retweet(id)
stream = ConnectionTester(bearer_token)
stream.add_rules(
[
tweepy.StreamRule("#Python"),
tweepy.StreamRule("#Tweepy"),
]
)
stream.filter() |
Beta Was this translation helpful? Give feedback.
New Apps:
https://twittercommunity.com/t/deprecation-announcement-removing-compliance-messages-from-statuses-filter-and-retiring-statuses-sample-from-the-twitter-api-v1-1/170500
You'll have to use Twitter API v2.