tweetinvi
tweetinvi copied to clipboard
Filtered Streams giving me 403 Forbidden
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\nWith URL: https://stream.twitter.com/1.1/statuses/filter.json?track=%40twitterusername&stall_warnings=true&tweet_mode=extended
This URL looks to be retired now?
For usernames use AddFollow. Use AddTrack for text.
Response code 403 is Forbidden. https://developer.twitter.com/en/support/twitter-api/error-troubleshooting