What is the format for search operators / special characters


Hi All,

I’m successfully connecting to the streaming API and using the filter parameter. I have tried to add the location parameter in and the Authorization fails.

I have added the location string into the OAuth base string and encoded it as the documentation requires. I have then included it on the end of the POST data eg https://blah/blah.json?track=Silverstone&locations=-2.10, 58.23, -2.78, 60.60

I don’t understand why the authorization fails. I suspect it is something to do with the fact I encoding the geocodes in the authorization string. Is any able to clarify as the documentation is unclear (to me at least.)

Thank you.


OK I tracked this back to having ANY comma in the data string causes the authorization to fail… I’m still looking into it.

For example if I send https://stream.twitter.com/1.1/statuses/filter.json?stall_warnings=true&track=stafford%2C%20council - 401 unauthorized received

if I send send https://stream.twitter.com/1.1/statuses/filter.json?stall_warnings=true&track=stafford council - Connected and start receiving stream…

Any ideas - I’m seriously stuck… (as you can see I’m encoding both the signature base string values and the values on the data string on the URI).



Also, the OAuth tool values fail too. I checked my code generated values (several times!) against the OAauth tool generated base string and they are exactly the same, The OAuth header’s are same with exception of the time and therefore the signature… But the OAuth tool values get the same response - 401 Unauthorised (when manually submitted using fiddler2)…

here’s my values --> this time using track parameters of ‘silverstone + F1’ (minus the quotes obviously)

OAuth Signature Base String is:-

URI params


in answer to my own questions! don’t code when tried :slight_smile:

in c#, when encoding your params always use System.Uri.EscapeDataString and not System.Uri.EscapeUriString…


Thanks for following up with the solution. For the OAuth tool, you shouldn’t preemptively escape the fields you’re sending (although this is a little unintuitive). Using the string “stall_warnings=true&track=silverstone + F1” worked for me.