Code: Select all
string authorizationHeader = "Authorization: ODFHIR NFF6i0KrXrxDkZHt/VzkmZEaUWOjnQX2z";
WebRequest request = WebRequest.Create("https://api.opendental.com/api/v1/patients");
request.Method = "GET";
request.Headers.Add(authorizationHeader);
request.ContentType = "application/json";
WebResponse response = request.GetResponse();
Console.WriteLine(((HttpWebResponse)response).StatusDescription);
using (Stream dataStream = response.GetResponseStream())
{
StreamReader reader = new StreamReader(dataStream);
string responseFromServer = reader.ReadToEnd();
Console.WriteLine(responseFromServer);
}
response.Close();
When I execute the same request in PostMan I receive:
Code: Select all
"Message": "An error has occurred."
- I have created inbound rule Open Dental eConnector described here: https://www.opendental.com/manual/allowapplication.html
- I have white-listed Ports and scoped IP addresses described here: https://www.opendental.com/manual/eserviceports.html
- I have verified that both OpenDentalEconnector and OpenDentalService are installed and running (https://ibb.co/C7LQkrv, https://ibb.co/znbCYTS)
Any help would be greatly appreciated!