You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’m using tweepy to stream tweets and I’ve subscribed to basic tier program:
The code looks something like the following, I read in a couple of articles and tutorials that tweepy works with basic tier but I’m getting the error below on running the code.
auth = OAuthHandler(consumer_key, consumer_secret)
auth.set_access_token(access_token, access_secret)
api = API(auth)
rdd_queue = []
class CustomStreamListener(tweepy.StreamingClient):
def init(self, bearer_token, rdd_queue):
super().init(bearer_token)
self.rdd_queue = rdd_queue
Error:
Stream encountered HTTP error: 403
HTTP error response text: {“client_id”:“XXXXXXX”,“detail”:“When authenticating requests to the Twitter API v2 endpoints, you must use keys and tokens from a Twitter developer App that is attached to a Project. You can create a project via the developer portal.”,“registration_url”:“XXX/projects/overview”,“title”:“Client Forbidden”,“required_enrollment”:“Appropriate Level of API Access”,“reason”:“client-not-enrolled”,“type”:“XXX/2/problems/client-forbidden”}
but i’ve already created an app within a project, could someone tell me what’s going on? or if anything is wrong in the code?
The text was updated successfully, but these errors were encountered:
I’m using tweepy to stream tweets and I’ve subscribed to basic tier program:
The code looks something like the following, I read in a couple of articles and tutorials that tweepy works with basic tier but I’m getting the error below on running the code.
auth = OAuthHandler(consumer_key, consumer_secret)
auth.set_access_token(access_token, access_secret)
api = API(auth)
rdd_queue = []
class CustomStreamListener(tweepy.StreamingClient):
def init(self, bearer_token, rdd_queue):
super().init(bearer_token)
self.rdd_queue = rdd_queue
def on_tweet(self, tweet):
print(tweet.text)
self.rdd_queue.append(tweet.text)
listener = CustomStreamListener(bearer_token=bearer_token, rdd_queue=rdd_queue)
listener.filter(expansions=‘author_id’, tweet_fields=‘created_at’)
Error:
Stream encountered HTTP error: 403
HTTP error response text: {“client_id”:“XXXXXXX”,“detail”:“When authenticating requests to the Twitter API v2 endpoints, you must use keys and tokens from a Twitter developer App that is attached to a Project. You can create a project via the developer portal.”,“registration_url”:“XXX/projects/overview”,“title”:“Client Forbidden”,“required_enrollment”:“Appropriate Level of API Access”,“reason”:“client-not-enrolled”,“type”:“XXX/2/problems/client-forbidden”}
but i’ve already created an app within a project, could someone tell me what’s going on? or if anything is wrong in the code?
The text was updated successfully, but these errors were encountered: