How to automate Application-only OAuth for Streaming APIs?


For Search API, things were rather simple:

  1. I simply obtain the access_token from OAuth ( by supplying the consumer_key and consumer_secret in the header through “Authorization: Basic” format

  2. I perform the Search API ( and supply the access token in the header through “Authorization: Bearer” format

This procedure doesn’t seem to work in Streaming API ( I get a 401 Unauthorized error.

The only procedure that worked is to get the signature via OAuth tool and manually execute the curl command.

How do I automate this procedure without having to go to the website ( to manually press the Get Signature button?

Thanks in advance!