Twitter Streaming Unauthorized


I have built a Twitter library for getting data from twitter apis. The REST APIs are working fine. I am getting a 401 unauthorized error for Public Streams by location. Here are the error details:

Transfer-Encoding: chunked
Cache-Control: must-revalidate,no-cache,no-store
Content-Type: text/html
WWW-Authenticate: OAuth realm=“Firehose”

The api I am accessing is :,16.3795280,55.66669990,32.1542840

Here is my code:

                Uri =,16.3795280,55.66669990,32.1542840
                System.Uri APIUrl = new System.Uri(Uri);
                //The Header builder generates the signature as well.
                UriHeader = APIHelper.RequestHeaderBuilder(Credentials, APIUrl);
                //Generate Web Request & Request Header
                HttpWebRequest webRequest = null;
                webRequest = (HttpWebRequest)System.Net.WebRequest.Create(APIUrl);
                webRequest.Method = "GET";
                webRequest.ContentType = "application/x-www-form-urlencoded";
                webRequest.Headers.Add("Authorization", UriHeader);
                webRequest.Host = "";
                    HttpWebResponse TwitterResponse = (HttpWebResponse)webRequest.GetResponse();
                    using (StreamReader reader = new StreamReader(TwitterResponse.GetResponseStream()))
                        while (true)
                            var line = reader.ReadLine();
                            if (String.IsNullOrEmpty(line)) continue;

                            dynamic obj = JsonConvert.DeserializeObject(line);

                            if (obj.user != null)
                                Console.WriteLine(obj.user.screen_name + ": " + obj.text);


The signature is working fine for other APIs. Can you please tell me if I am missing something.


I get the same error.


Hello Arshad and Hampus,

Please make sure the time on your servers is correct. The system clock is used by the OAuth implementation and needs to be in sync with the Twitter servers. You can check the current time in the “Date” HTTP header returned with every request.

Read more about Troubleshooting OAuth 1.0A at and please let us know if that fixes your issues.


Thank you! With only 6 minutes difference I was suffering this trouble.


The clock is synchronized. Do I use GET or POST? I am using GET. If that’s correct, then what’s the issue?




I don’t understand the language.


Hello Arshad, this endpoint requires a POST. Please see [node:10389].