开发者

Delicious API replies with "access denied"

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

curl https://myusername:mypassword@api.del.icio.us/v1/posts/all

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

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

What's wrong?


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜