Invalid HTTP response when using https://stream.twitter.com/1.1/statuses/filter.json, am I blacklisted


#1

We are very new to the Twitter API and am maintaining an existing project. We get the error below when trying to filter real time tweets followed by error 420 below that

(Twitter Stream consumer /  [2][Establishing connection]) An exception has occured on [onException] : : Invalid Http response
Relevant discussions can be found on the Internet at:
	http://www.google.co.jp/search?q=1169356e or
	http://www.google.co.jp/search?q=df77bce2
TwitterException{exceptionCode=[1169356e-df77bce2 c2863472-0f7fdb34 c2863472-0f7fdb25], statusCode=-1, message=null, code=-1, retryAfter=-1, rateLimitStatus=null, version=4.0.7}
	at twitter4j.HttpClientImpl.handleRequest(HttpClientImpl.java:185) [twitter4j-core-4.0.7.jar:4.0.7]
	at twitter4j.HttpClientBase.request(HttpClientBase.java:57) [twitter4j-core-4.0.7.jar:4.0.7]
	at twitter4j.HttpClientBase.post(HttpClientBase.java:86) [twitter4j-core-4.0.7.jar:4.0.7]
	at twitter4j.TwitterStreamImpl.getFilterStream(TwitterStreamImpl.java:356) [twitter4j-stream-4.0.7.jar:4.0.7]
	at twitter4j.TwitterStreamImpl$8.getStream(TwitterStreamImpl.java:330) [twitter4j-stream-4.0.7.jar:4.0.7]
	at twitter4j.TwitterStreamImpl$TwitterStreamConsumer.run(TwitterStreamImpl.java:570) [twitter4j-stream-4.0.7.jar:4.0.7]
Caused by: java.io.IOException: Invalid Http response
	at sun.reflect.GeneratedConstructorAccessor159.newInstance(Unknown Source) [:1.8.0_40]
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [rt.jar:1.8.0_40]
	at java.lang.reflect.Constructor.newInstance(Constructor.java:422) [rt.jar:1.8.0_40]
	at sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1889) [rt.jar:1.8.0_40]
	at sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1884) [rt.jar:1.8.0_40]
	at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.8.0_40]
	at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1883) [rt.jar:1.8.0_40]
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1456) [rt.jar:1.8.0_40]
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1440) [rt.jar:1.8.0_40]
	at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254) [rt.jar:1.8.0_40]
	at twitter4j.HttpResponseImpl.<init>(HttpResponseImpl.java:50) [twitter4j-core-4.0.7.jar:4.0.7]
	at twitter4j.HttpClientImpl.handleRequest(HttpClientImpl.java:149) [twitter4j-core-4.0.7.jar:4.0.7]
	... 5 more
Caused by: java.io.IOException: Invalid Http response
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1554) [rt.jar:1.8.0_40]
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1440) [rt.jar:1.8.0_40]
	at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480) [rt.jar:1.8.0_40]
	at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:338) [rt.jar:1.8.0_40]
	at twitter4j.HttpResponseImpl.<init>(HttpResponseImpl.java:35) [twitter4j-core-4.0.7.jar:4.0.7]
	... 6 more

[Establishing connection]) An exception has occured on [onException] : : 420:Returned by the Search and Trends API when you are being rate limited (https://dev.twitter.com/docs/rate-limiting).
Returned by the Streaming API:
 Too many login attempts in a short period of time.
 Running too many copies of the same application authenticating with the same account name.
Exceeded connection limit for user

Relevant discussions can be found on the Internet at:
	http://www.google.co.jp/search?q=1169356e or
	http://www.google.co.jp/search?q=df77bcd3
TwitterException{exceptionCode=[1169356e-df77bcd3], statusCode=420, message=null, code=-1, retryAfter=-1, rateLimitStatus=null, version=4.0.7}
	at twitter4j.HttpClientImpl.handleRequest(HttpClientImpl.java:170) [twitter4j-core-4.0.7.jar:4.0.7]
	at twitter4j.HttpClientBase.request(HttpClientBase.java:57) [twitter4j-core-4.0.7.jar:4.0.7]
	at twitter4j.HttpClientBase.post(HttpClientBase.java:86) [twitter4j-core-4.0.7.jar:4.0.7]
	at twitter4j.TwitterStreamImpl.getFilterStream(TwitterStreamImpl.java:356) [twitter4j-stream-4.0.7.jar:4.0.7]
	at twitter4j.TwitterStreamImpl$8.getStream(TwitterStreamImpl.java:330) [twitter4j-stream-4.0.7.jar:4.0.7]
	at twitter4j.TwitterStreamImpl$TwitterStreamConsumer.run(TwitterStreamImpl.java:570) [twitter4j-stream-4.0.7.jar:4.0.7]

Is it correct to conclude that this application has been blacklisted? We have not been receiving tweets or direct messages real time. They only come in historically. Who can we contact to have the app removed off of the blacklist?

Thanks for your help


#2

There’s no reason to expect this to have been blacklisted. This is a standard response when you’re being rate limited for frequent reconnections. It looks like you’ve tried to connect too many times in a short period, or that you’ve tried to connect too many copies of your application to the endpoint. There’s documentation on this here.

Note that the API endpoint you are trying to connect to (statuses/filter) only delivers Tweets, and not Direct Messages.


#3

Thank you so much.


#4