Summary:  When I try to add someone to a list using 'curl' with
--netrc it is failing, but if I use "-u username:password" it works.

Of course the first thought is that ~/.netrc isn't setup right
(although it's been working fine for months). But I double checked
that it is. Watch:

1) Verify that my information in ~/.netrc is valid and accessible:

#  curl --location --referer ";auto" -D - -s --netrc
http://twitter.com/account/rate_limit_status.xml
HTTP/1.1 200 OK
Date: Sun, 06 Dec 2009 20:41:13 GMT
{edited}

2) verify AGAIN that netrc is working

# curl --location --referer ";auto" -D - -s --netrc
http://twitter.com/blocks/blocking.xml
HTTP/1.1 200 OK
Date: Sun, 06 Dec 2009 20:44:19 GMT
Server: hi
X-RateLimit-Limit: 20000
{edited}


3) Try to add someone to list "new-followers"

# curl --location --referer ";auto" -D - -s --netrc -d "id=25148966"
http://api.twitter.com/1/tj/new-followers/members.xml

HTTP/1.1 401 Unauthorized
Date: Sun, 06 Dec 2009 20:45:34 GMT
Server: hi
Status: 401 Unauthorized
WWW-Authenticate: Basic realm="Twitter API"
X-Runtime: 0.00164
Content-Type: application/xml; charset=utf-8
Content-Length: 152
Cache-Control: no-cache, max-age=1800
Set-Cookie: 
_twitter_sess=BAh7BzoHaWQiJTgwMDhmYWMwNDU4ODkxNmIzODFhZjJmMTY4ZTU3YzkwIgpm%250AbGFzaElDOidBY3Rpb25Db250cm9sbGVyOjpGbGFzaDo6Rmxhc2hIYXNoewAG%250AOgpAdXNlZHsA--e8bdf83c0b67e77b39c841d940153e181af893a3;
domain=.twitter.com; path=/
Expires: Sun, 06 Dec 2009 21:15:34 GMT
Vary: Accept-Encoding
Connection: close

<?xml version="1.0" encoding="UTF-8"?>
<hash>
  <request>/1/tj/new-followers/members.xml</request>
  <error>Could not authenticate you.</error>
</hash>

This happens every time.


4) Try same command, but using -u instead of --netrc (password
*****-ed out in email)

# curl --location --referer ";auto" -D - -s -u tj:********** -d
"id=25148966" http://api.twitter.com/1/tj/new-followers/members.xml
HTTP/1.1 200 OK
Date: Sun, 06 Dec 2009 20:46:10 GMT
Server: hi
X-Transaction: 1260132370-28062-8379
Status: 200 OK


I have no idea why this might not be working. Can anyone hazard a guess?

TjL

Reply via email to