tweetinvi icon indicating copy to clipboard operation
tweetinvi copied to clipboard

Filtered Streams giving me 403 Forbidden

Open gabs247 opened this issue 2 years ago • 1 comments

I'm just trying to follow the TweetInvi and Twitter API documentation to do something pretty simple with the streams.

When I run the Twitter API via cURL with the BearerToken generated in my Twitter Dev account, it works.

var userClient = new TwitterClient(consumerKey, consumerSecret);
var stream = userClient.Streams.CreateFilteredStream();
stream.AddTrack("@TwitterUsername");
stream.MatchingTweetReceived += (sender, eventReceived) =>
{
    // do stuff
};
await stream.StartMatchingAnyConditionAsync();

When I run this code though, I get:

\n\n\nError 403 <p>With URL: https://stream.twitter.com/1.1/statuses/filter.json?track=%40twitterusername&stall_warnings=true&tweet_mode=extended</p> <p>This URL looks to be retired now?</p>

gabs247 avatar Aug 16 '22 06:08 gabs247

For usernames use AddFollow. Use AddTrack for text.

Response code 403 is Forbidden. https://developer.twitter.com/en/support/twitter-api/error-troubleshooting

Scobiform avatar Aug 19 '22 10:08 Scobiform