Question

I got delicious account a few days ago, and I want to use its API with PHP/curl. I use such a function:

$ch=curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.delicious.com/v1/posts/add?&url=SOME_URL");
curl_setopt($ch, CURLOPT_USERAGENT, $USER_AGENT);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $CONNECT_TIMEOUT);
curl_setopt($ch, CURLOPT_TIMEOUT, $CONNECT_TIMEOUT);
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
curl_setopt($ch, CURLOPT_USERPWD, "MY_USER:MY_PASS");
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
$result=curl_exec($ch);
curl_close($ch);
return $result;

It always returns ACCESS DENIED error. I know the code works because I use the same code with Bing API and it works perfectly (also tested with some other sites that use http authorization - works perfectly).

So what is wrong here? My user/pass is OK, since the same URL works if I enter it into browser and type my user/password.

No correct solution

OTHER TIPS

In case someone has the same problem, here's the answer. I contacted Delicious team, and the problem was related to their SSL. Here's what they sent to me:

"This is likely the result of our SSL certificate expiring accidentally. We're working to resolve this issue as soon as possible and get the certificate for https://delicious.com renewed. The secure website, as well as the API, should be working again within a few hours"

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top