Skip to content

Filtered Stream never returning

I’m trying to build a bot using Twitter API. I’m testing Filtered stream to read the latest tweets with some words.

To test I create a single rule with a trending topic from Brasil:

    "data": [
            "id": "1360964144200110081",
            "value": "carnaval lang:pt",
            "tag": "Carnaval"
    "meta": {
        "sent": "2021-02-14T15:47:31.321Z"

But when I execute the GET Stream, it never returns. I believe this can be a WebSocket, but I can’t find that information on docs.

I’m doing a request on using the Authorization token and I’m getting 200 as a response, but the connection is never closed and no content.

I’m using the following code to call:



The problem is that I was expecting a String, but, as it is a WebSocket, the Response never ends. I change it to an InputStream and it starts working.