views:

233

answers:

2

Hi all,

I'm trying to access all posts from delicious, according to delicious API. In Ubuntu Linux i give the command:

curl https://myusername:[email protected]/v1/posts/all

where myusername and mypassword are registered with an yahoo mail account. I get the answer:

    <?xml version="1.0" standalone="yes"?>
<result code="access denied" />
<!-- fe07.feeds.del.ac4.yahoo.net uncompressed/chunked Mon Nov  9 13:06:28 PST 2009 -->

What's wrong?

+1  A: 

What exactly is the status code you get? Code 999? If so, that's Yahoo's default status code for throttling your requests, i.e. you're trying to pull your posts too often. I've noticed that if you make the /posts/all call too often (more than once every few minutes), you'll get throttled.

If you don't need to get ALL of your posts, you should try using the /v1/posts/recent call with whatever options you may want. That seems to work for me. Yahoo/Delicious doesn't throttle that request.

kchau
code 999 only when requested from Firefox's address bar.
lmsasu
For posts/recent I get the same xml as given in the question.
lmsasu
So, making the call the way you are, the SSL cert can't be verified because it doesn't know where to get it. If you want it to be authenticated, you'll have to provide the Equifax root CA. If authentication isn't necessary, you can use the -k option like so:curl -k -u username:password https://api.del.ic.ious/v1/posts/recent
kchau
Sorry, the post formated my url... it should be https :// api.del.ic.ious/v1/posts/recent
kchau
+1  A: 

If you're registered with a Yahoo! ID, you need to use OAuth rather than basic authentication.

Unfortunately, using command-line tools like this is considerably harder with OAuth. Last I checked there wasn't a simple way to do it.

Stephen Darlington