Hi cmcgehee,
You are doing fantastic job by helping everyone here.
This is my first post. I am a developer and trying to integrate OpenDental with one of our Web Application.
I was trying to get list of appointments using a test PHP script by using our FHIRAPIKey of OpenDental setup.
Here is the code:
Code: Select all
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.opendental.com/fhir/appointment",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => false,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"Content-Type: application/json",
"x-auth-token: FHIRAPIKey=XXXYYYZZZ",
"Accept: application/json"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
print_r(json_decode($response));
} ?>
But that always return me error as below:
Code: Select all
stdClass Object
(
[issue] => Array
(
[0] => stdClass Object
(
[severity] => error
[code] => login
[details] => stdClass Object
(
[text] => Developer API key required.
)
)
)
)
I have confirmed, the eConnector service is running.
OpenDental version is: 19.1.44.0
Please let me know what else i can check to troubleshoot this.
Looking forward to hearing back from you soon.
Thank You.