Use twurl and streamming API authentication and filter



Hi everybody, I am new to using Stream API and twurl.

I Install twurl in windows and want to use it from the command line to get tweets using the stream api. I want to solve everything within a .bat file. The problem is not how to write, I tried this:

twitter.bat content:

twurl authorize -u <myusername> -p <MyPassword> --consumer-key <Mykey> --consumer-secret <MySecret> -t -d twurl track = <HashTag> H /1.1/statuses/filter.json>tweets.txt

The server response is:
… go to url and paste in the supplied PIN

  1. as I can automate this?
  2. as I can get use those credentials to run the following line (the api stream filter)?

Thank you very much x the help you can give me


You need to do this as two steps:

  1. twurl authorize -> should give you a link which you can open, get the PIN, and paste back to the command line
  2. twurl -d track ...


Thanks Andy for you answer, but i need automate all process (without user intervention) , is possible to do this?


Andy I paste in command line my PIN (obtined from the url response) and then execute the second line :

twurl -t -d track=#BuenViernes -H /1.1/statuses/filter.json>tweets.txt
here is my new error:

\n\n\nError 401 Unauthorized


Problem accessing '/1.1/statuses/filter.json'. Reason:


Any Ideas?

PHP Streaming API was working fine, now returning 401 Unauthorized error

I did the same steps and got the same error. Any one got solution for this ?