401 Authorization errors to Streaming endpoints, no issue for Search


#1

Hi,

I am currently experiencing issues accessing Streaming API endpoints and receiving 401 errors even with running basic tests generated from the Twitter developer console (Test OAuth) such as statuses/sample.json. The OAuth authentication works fine for endpoints such as Search, I only see the streaming APIs have a problem.

I’m not sure if it’s related, but I am not experiencing this issue when initiating requests from certain US-based servers, but I have tried on various AU-based clients and they all consistently return 401 for Streaming, and work fine for other REST-ful APIs such as Search.

I have tried various apps and regenerated keys with the same result.


#2

IamSemz,

Please sync those servers’ clocks using NTP or equivalent. The authentication flow used by twitter (OAuth) depends on a timestamp with a given error threshold. Any difference beyond that will cause a 401.


#3

Seb,

Thanks for your response. I have checked this with the timestamp returned and they are definitely aligned (I have the same issue with my desktop). In fact, the server it’s working on is several minutes off.

Also, this would make the other OAuth requests fail, wouldn’t it? Search works fine off all of the clients that Streaming returns 401 for.


#4

We are faced at same problem. In REST API, it works well. But the Stream API returned 401.
I’m check my system clock and credentials. I couldn’t find any problem in it.


#5

We have the same problem. We’re using fennb/phirehose.

Any one have any information about this ?


#6

Same here using Tweepy. Our server are in Oregon and they are correctly synchronized via NTP.
We first experienced the issue today at 06:21 UTC?
According to https://dev.twitter.com/status stream faced some problem but now is up and running but we still experience the issue.

Any one have any idea on this issue?


#7

same issue for me. simple curl to status/filter.json fails with 401, but call with same keys to account/verify_credentials works fine.


#8

Same issue for me.

I did notice that this seems to affect only some of the servers behind stream.twitter.com.

At least IPs 199.59.148.229 and 199.59.148.138 are affected. Perhaps the clocks on these Twitter’s servers is off? My server clocks are definitely in correct time.

The IP 199.16.156.20 is NOT affected. So I’m using that for now.


#9

I’m having issues too. 401s all afternoon. Please someone tell me it’s not just me.


#10

Thanks for the report, we’re working on fixing that problem with the public streams.


#11

Temporary workaround here - http://stackoverflow.com/questions/23986148/twython-401-on-stream-but-rest-works-fine


#12

The streaming API should now work once again.


#13

Be very careful with that, as if you forget to remove that work-around, if there is a problem in that other datacenter you will still connect to the bad one.


#14

Rockin and rollin!
Looking good, thanks!