Reputation: 1812
I've got a bearer token from api.twitter.com/oauth2/token
.
However it works only with the REST APIs. Using it against public stream APIs returns me 401 unauthorized
.
I can't find any oauth doc specific to stream APIs.
What am I missing?
EDIT 1
Here is the curl command I'm using for my tests:
curl --verbose \
Streaming : -H "Authorization: Bearer <token>" \
--get "https://stream.twitter.com/1.1/statuses/filter.json" \
--data "follow=150367205"
Am I missing some headers? Again, it works fine for the REST APIs.
EDIT 2
I've found an answer on twittercommunity.com, dating from 2013/06, saying that Twitter's public streaming APIs don't support application-only authentication.
Is it still the case?
Upvotes: 1
Views: 1272
Reputation: 1812
OK I missed a key point of Twitter's official documentation on app-only authentication:
And it won’t be able to:
* ...
* Connect in Streaming endpoints;
* ...
Upvotes: 4