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.