0

I have a service that collect tweets from twitters stream API, fillterd by Keywords. It worked fine till last tuestday, that start throw this error:

Code : 403 Error documentation description : Forbidden - The request is understood, but it has been refused or access is not allowed. An accompanying error message will explain why. This code is used when requests are being denied due to update limits.

When i use the regulare twiiter API with the same tokens, it work just fine. I wrote some POC to examine the problem, but didn't successed. here is the code i use:

var userClient = new TwitterClient(ConsumerKey, ConsumerSecret, UserAccessToken, UserAccessSecret);
var tweets = await userClient.Search.SearchTweetsAsync("hello");
var stream = userClient.Streams.CreateFilteredStream();
stream.AddTrack("france");
stream.AddTrack("hello world");
stream.AddFollow(42);
stream.EventReceived += (sender, eventReceived) =>
{
    Console.WriteLine(eventReceived.Json);
};
stream.StreamStopped += (sender, args2) =>
{
    Console.WriteLine(args2.Exception.ToString());
};

await stream.StartMatchingAllConditionsAsync();

I also get this error:

Reason : \n\n\nError 403 Code : -1 Date : 17/03/2023 14:32:56 +02:00 URL : https://stream.twitter.com/1.1/statuses/filter.json?follow=42&stall_warnings=true&tweet_mode=extended Twitter documentation description :

Any one have an idea, whats wrong? Change in Twitter stream API, problem with Tweetinvi ?

  • It's probably due to this: https://developer.twitter.com/en/updates/changelog: ***March 14, 2023: Twitter API v1.1**: Today, we are deprecating the statuses/filter endpoint in the Twitter API v1.1 Developers can use the filtered stream endpoint in the Twitter API v2.* – dbc May 21 '23 at 17:04

0 Answers0