I've pasted my code below. I'm getting an empty string back, no curl error or anything.
$service_url = "https://api.insight.ly/v2.1/Opportunities";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $service_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLINFO_HEADER_OUT, true);
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($ch, CURLOPT_USERPWD, "-my-base64-encoded-api-key");
$data = curl_exec($ch);
curl_close($ch);
since the documentation for the Insightly API said to leave password blank, i've also tried
curl_setopt($ch, CURLOPT_USERPWD, "-my-base64-encoded-api-key:");
and
curl_setopt($ch, CURLOPT_USERPWD, "-my-base64-encoded-api-key: ");
Any help would be appreciated. Thank you.