fennb/phirehose

Issue trying to connect, getting 401 Unauthorized

Closed this issue · 1 comments

j0an commented

Hi all.

I'm getting an 401 error when I try to connect to Twitter API.
The code & library just for like 1.5 years, and one day, just can't connect.

Here the return.

Phirehose: Connecting to twitter stream: https://stream.twitter.com/1.1/statuses/filter.json with params: array (  'track' => '#buenosaires',)
Phirehose: Connecting to ssl://stream.twitter.com, port=443, connectTimeout=5
Phirehose: Connection established to stream.twitter.com
Phirehose: POST /1.1/statuses/filter.json HTTP/1.1
Host: stream.twitter.com:443
Connection: Close
Content-type: application/x-www-form-urlencoded
Content-length: 20
Accept: */*
Authorization: OAuth realm="",oauth_consumer_key="XXX",oauth_nonce="XXX",oauth_signature_method="HMAC-SHA1",oauth_timestamp="1443223423",oauth_version="1.0A",oauth_token="1461291-XXXX",oauth_signature="XXX"
User-Agent: Phirehose/1.0RC +https://github.com/fennb/phirehose

track=%23buenosaires


Phirehose: HTTP failure 1 of 20 connecting to stream: HTTP ERROR 401: Authorization Required (<html>\n<head>\n<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>\n<title>Error 401 Unauthorized</title></head><body><h2>HTTP ERROR: 401</h2><p>Problem accessing '/1.1/statuses/filter.json'. Reason:<pre>    Unauthorized</pre></body></html>). Sleeping for 10 seconds.

I don't figure out how to debug, because this points

  • In local, with the same code, library version the code works fine and I connect to twitter.
  • I renew the twitter credentials and testing the direct cURL command in this server the connection works (just to discard some ban from twitter)

I don't know what can it be.
Any thought?

j0an commented

Solved, was the hour on the server.

shame on me.