I recently started working on some older code done by my colleague on Twitter Streaming API. Not knowing that it might not have handled 420 error properly. In the first few weeks, the streaming API would send me tweets. However, since a few weeks ago, I have stopped receiving any response at all.
I am using the tweetstream gem for ruby. This is the steps I took to investigate the issue:
At my office ip, using existing authentication configuration (auth A), I no longer get any tweets.
At my office ip, using a different set of authentication configuration (auth B), I still can’t get any tweets.
On an EC2 server, using auth A, I start getting Tweets.
On an EC2 server, using auth B, I also get Tweets.
So, my conclusion is that my office ip has been blacklisted. Is there anyway to get the office ip released? How do I ensure not getting banned again?
Should I handle both stream limit and rate limit, and delay restarting of the stream exponentially? Currently I don’t think my code has this in place.
Should I implement the Restful API endpoint to continue searching for query term while at the delayed restart?
My code would get if there is no query terms inserted to the database and restart the stream with new queries set. Should I do this only periodically and not at every new change of my query terms?
My code would perform a manual restart of the stream every 6 hours. Is this acceptable?