Streaming API 400 error


#1

Hi,

I have been using Twitter user stream for a month and it was working fine. Currently it encounter an issue. Now am always getting 400 http code as response. So please help me to fix this issue ? I am using Http version 1.1


#2

Hello Sujith,

A 400 HTTP error code means your request was invalid. Could you please give us more details on the endpoint and parameters you are using, as well as the accompanying message your are receiving with the error? Thanks!


#3

Sure. I am using PHP Phirehose for implementing the user stream API.

Url is https://userstream.twitter.com/1.1/user.json
Parameters are : delimited=length&with=user&replies=all
Port is 443
Content-type: application/x-www-form-urlencoded
Accept: /

Error :
‘Phirehose: HTTP failure connecting to stream: HTTP ERROR 400: Bad Request (Bad Request)’

Please let me know if any other details are required


#4

Could you please check if you are using the latest version of Phirehose? https://github.com/fennb/phirehose

If not, please let us know if updating the sources helps. I noticed they performed some changes recently regarding User Stream support.


#5

I replaced my library code with the latest version in git hub and its working fine.

Thanks @romainhuet for your reply. It helped me a lot


#6

Thanks Sujith for the note, glad to hear it fixed your issue.