I am trying to use Crocodoc api with the following code to get the status.
$croco = new Crocodoc();
$uuids = "786e072b-981c-4d2a-8e80-80e215f1f7c2";
echo "\n\nchecking status of : ", $uuids;
$status = $croco->getStatus($uuids);
echo "\n\nstatus is : ", $status;
class Crocodoc {
public $api_key = 'HPUd6LZXg5174TAENbvBcx30';
public $api_url = 'https://crocodoc.com/api/v2/';
public function getStatus($uuids){
$url = $this->api_url.'document/status';
$token = $this->api_key;
$dataStr = '?token='.$token.'&uuids='.$uuids;
// this is a GET request
$output = $this->doCurlGet($url, $dataStr);
return $output;
}
}
I don’t get the status and no error. What is wrong or it does not work in evaluation mode. Right now I am using it local with XAMPP, can that be a problem?
What
doCurlGetdoes?Because the request (and response) is fine:
You might try with a real curl, like:
Or directly:
Edit:
Just tried this code, and it works fine: