The remote server returned an error: (500) Internal Server Error
Posted: Wed Apr 21, 2021 2:05 pm
I am able to successfully access OD API via Tester credentials through C# without issues, using the code below:
However, I am now wanting to access my OD server installed locally but I receive "The remote server returned an error: (500) Internal Server Error" error when I use the same code after changing DeveloperKey/CustomerKey in the authorization header accordingly.
When I execute the same request in PostMan I receive:
I am running Windows 10 with OD version 20.5.47.0:
Any help would be greatly appreciated!
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!