Streaming API Oauth returns 401 Unauthorized


#1

I’m trying to open a connection to “http://userstream.twitter.com/2/user.json” with libcurl using liboauth for oauth authentication but received the 401 error code.
My access token works with the REST api.
The request url is like this:
http://stream.twitter.com/1/statuses/sample.json?oauth_consumer_key=bRHhkPtSm0LINx323EiWCA&oauth_nonce=5PCv0DgTldgFZod&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1311227244&oauth_token=15975251-hmBF1LW9rKvatolnK2iJSgYV3xR5MfqeV3p9LzPa2&oauth_version=1.0&oauth_signature=zl%2FRlf%2FWLRZGtjEBQKCUMN4gc1E%3D

Anyone can help?

Thanks.


#2

Sorry I posted the wrong url, the request url is this:
https://userstream.twitter.com/2/user.json?oauth_consumer_key=bRHhkPtSm0LINx323EiWCA&oauth_nonce=mAam3hR_FqUYvBoIzK7PWhC9&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1311228657&oauth_token=15975251-hmBF1LW9rKvatolnK2iJSgYV3xR5MfqeV3p9LzPa2&oauth_version=1.0&oauth_signature=xt%2BYPLRKOhk9UT59RRFt8j96uH8%3D


#3

Problem solved.


#4

I got the same problem like you.How did you solve this problem? Can you share your solutions, pls?


#5

the callback function should return the count of characters received.


#6

Can you paste a copy of the function you were able to get working?

Thx


#7

Did someone found the solution?
Please share.

Thanks


#8

Plz share

Thx…