question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

V2 Filtered Search Rate Limit

See original GitHub issue

I am trying to use the v2 filtered search to monitor an handle, but i am getting “Rate Limit Exceeded” almost immediately the stream starts. Here is my code. What am i doing wrong?

           var stream = client.StreamsV2.CreateFilteredStream();
            
            stream.TweetReceived += Stream_TweetReceived;
            var pars = new StartFilteredStreamV2Parameters();
            pars.ClearCustomQueryParameters();
            pars.ClearAllFields();
            pars.Expansions = new HashSet<string>(new string[] { "in_reply_to_user_id", "author_id","referenced_tweets.id","referenced_tweets.id.author_id" });
            pars.UserFields = new HashSet<string>(new string[] { "created_at", "entities", "id", "name", "username", "in_reply_to_user_id", "profile_image_url" });
            pars.TweetFields= new HashSet<string>(new string[] { "author_id","conversation_id", "created_at","in_reply_to_user_id","referenced_tweets","text" });
            pars.CustomQueryParameters.Add(new Tuple<string, string>( "@", "permabot"));

            try
            {
                await stream.StartAsync(pars);
            }catch(Exception ee)
            {
                Debug.WriteLine(ee.Message);
            }

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
SamuelJames101commented, Aug 12, 2022

@weirdyang Can you send a link for the docs, I can’t find them and am confused how to use streamV2

0reactions
weirdyangcommented, Aug 27, 2022

Hi @tomazi776 and @SamuelJames101

I based my code off of this comment: https://github.com/linvi/tweetinvi/issues/1070#issuecomment-704780561

I have uploaded my incomplete but working implementation here: https://github.com/weirdyang/tweet-stream/blob/main/tweet-stream-lib/Configuration/TweetConfiguration.cs

rules in appsettings should be in this format:

  "Rule": [
    {
      "Tag": "cats with images",
      "Value": "cat has:images -is:retweet"
    }

and app credentials:

  "AppCredentials": {
    "ConsumerKey": "<Your consumer key>",
    "ConsumerSecret": "<Your consumer secret>",
    "BearerToken": "<Your bearer token>"
  }
Read more comments on GitHub >

github_iconTop Results From Across the Web

Rate limits | Docs | Twitter Developer Platform
Endpoint #Requests Window of time Per Part of the... DELETE_2_lists_param 5 15 minutes per user no DELETE_2_lists_param_members_param 5 15 minutes per user no DELETE_2_tweets_param 5 15...
Read more >
Filtered stream version comparison | Docs
The v2 filtered stream endpoints group is replacing the standard v1.1 statuses/filter and ... Default request rate limits, 5 connection attempts per 5...
Read more >
Understanding Twitter v2 API rate limits for filtered stream
There is an overall Tweet cap limit on the standard basic product track of 500,000 Tweets per month with the v2 API.
Read more >
Maximum connection limit for Filtered Stream - Twitter API v2
Currently, you can get up to 500,000 Tweets per month across these endpoints. This cap is applied at the project-level. You can also...
Read more >
Check my rate limits with the v2 API - Twitter Developers
[…] when rate limit errors occur, a best practice is to examine HTTP headers that indicate when the limit resets and pause requests...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found