Again: RSS from protected Twitter account


#1

I want to access protected Twitter accounts via their RSS feeds and I don’t come over this authentication thing.

Note: I just want to send a HTTP GET request from my C++ application to the RSS feed’s address, like every browser, and then parse the result. This should be very easy and robust and does indeed work fine with unprotected feeds. But using protected feeds is truely needed because of very personal (medical) data. Until now I tried the following:

a) using HTTP basic authorization, I put a HTTP header line

         <code>Authorization: Basic username:password</code>

into my HTTP request, username and password Base64 encoded, but the server returns 401 (authorization)

b) I found somewhere mentioned one can use an address like

        <code>http://username:password@twitter.com/statuses/user_timeline/XXXX.rss</code>

with username and password in clear text. This works in firefox. In my code I have at first the problem to resolve the HTTP host (the server). If I put username and password into the resolver I get “unknown host”. OK, I understand this. The server remains just twitter.com. But when I send

       <code>GET http://username:password@twitter.com/statuses/user_timeline/XXXX.rss HTTP/1.0</code>

to the resolved server I get again 401 (authorization).

c) I read using OAuth is “the only way” to access a RSS feed from a protected account.

What’s right? Is accessing a feed somewhere documented?
How to access a protected feed using plain HTTP?


#2

Basic auth is not supported on the REST API. You’ll need to use OAuth.