Developer Portal Access

This forum is for programmers who have questions about the source code.
Post Reply
mandmdiet
Posts: 113
Joined: Tue Aug 17, 2021 9:37 am

Developer Portal Access

Post by mandmdiet » Wed Aug 25, 2021 12:01 pm

I'm trying to figure out what I need access to in order to fully take advantage of the resources provided by Open Dental in regards to the Open Dental API. This document: https://www.opendental.com/manual/fhir.html talks about two separate APIs, one that is new and one that is old (FHIR). It sounds like, from the description, that I won't want to use the FHIR API, so we're just looking at the new API right now.

We recently obtained a developer key from some of the Open Dental support staff and we have a license of Open Dental we can use for development. I *think* that's all we need to move forward, but some of the documentation for Open Dental points to an "Open Dental Developer Portal". This sounds like something we probably also want access to, but I do notice the URL for it has "FHIR" in the name, which makes me think that maybe it's just for the older API that we won't likely be using.

My question is, would having access to this developer portal be of help to us and if so, how do we get access to the portal?

mandmdiet
Posts: 113
Joined: Tue Aug 17, 2021 9:37 am

Re: Developer Portal Access

Post by mandmdiet » Wed Aug 25, 2021 8:33 pm

I've just been informed by our developer that we have the Developer License Key but we also need the Developer API Key, which is apparently behind the Open Dental Developer Portal. So it looks like we *do* need access. Can I be pointed in the direction I need to go to get access to that? I haven't been able to find instructions in the documentation.

joes
Posts: 239
Joined: Tue Aug 13, 2019 12:41 pm

Re: Developer Portal Access

Post by joes » Thu Aug 26, 2021 8:29 am

API documentation for developers is in a PDF that can be downloaded from a link at the top of the following manual page: https://www.opendental.com/manual/fhir.html

Here is the information from that PDF regarding API Keys:
When requesting data from the API server, an API key must be present in the request header. API keys are
created by the 3rd-party developer from Open Dental’s developer portal:
https://api.opendental.com/portal/gwt/fhirportal.html
The API keys created from the developer portal can be entered into the Open Dental program to assign that
API key to a customer. Requests to our API using these keys must then include the developer API key and the
customer API key. To obtain a developer API key, contact vendor.relations@opendental.com. Please include the
details below.
Developer name:
Company name:
Email address:
A list of the API Resources you need access to, the level of access such as read/write/update:
A description of the application you are intending to build (type and purpose):

To assign an API key to an Open Dental customer, go to Setup -> Advanced Setup -> FHIR. Click the Add Key in
the lower left. Here is where you paste a key generated from the developer portal. The customer has the
ability to enable or disable a key. The customer can view permissions granted to that key, but they cannot
change those permissions.
Joe Sullivan
Open Dental Software
http://www.opendental.com

mandmdiet
Posts: 113
Joined: Tue Aug 17, 2021 9:37 am

Re: Developer Portal Access

Post by mandmdiet » Thu Aug 26, 2021 3:27 pm

OK thank you joes, I do remember reading this documentation in the past and we have received a key from vendor.relations@opendental.com, so that sounds like we have a Developer API Key. I'm getting a bit turned around when talking about all of the keys, so I'm going to attempt to color code them as I talk about them. That will help me make sure we're talking about the right keys.

So, we have the Developer API Key that we got from contacting Vendor Relations at the email address provided. From the description in the API documentation it sounds like we still need two other keys: a generic API Key mentioned in the second sentence and a Customer API Key mentioned further down in the description.

It sounds like we then add multiple "keys" that were created in the Developer Portal into the Open Dental software on the client machine. Here I'm referring to the sentence "The API keys created from the developer portal can be entered into the Open Dental program to assign that
API key to a customer.
". Although from your statement at the end it sounds like we only enter one key into Open Dental. If it's the former do we put both the Developer API Key and Customer API Key into the Open Dental software? Or maybe all three keys are put in the software? If it's the latter which of the keys do we put into Open Dental?

It sounds like we are missing the API Key mentioned in the second sentence above as well as the Customer API Key mentioned later as we have only obtained the Developer API Key through the email contact method. It also sounds like the API Key and Customer API Key might be obtained by gaining access to the Open Dental Developer Portal. Is that correct? Either way it sounds like we need to get into the Open Dental Developer Portal to generate one or more keys. Can you help me know what I need to do to get access to the Open Dental Developer Portal?

Thanks

joes
Posts: 239
Joined: Tue Aug 13, 2019 12:41 pm

Re: Developer Portal Access

Post by joes » Fri Aug 27, 2021 9:00 am

The wording is a bit confusing. I'll try to clear it up here. There are only two types of Keys. I'll refer to them as API Keys and the Developer API Key.
1. A Developer API Key is received from vendor.relations@opendental.com
2. The developer logs into this portal: https://api.opendental.com/portal/gwt/fhirportal.html (This has fhir in the url, but it is still used for the newer RESTful API Service)
3. The developer can create multiple API Keys at the portal.
4. An API Key, created at the portal, can be assigned to a customer by going to Setup -> Advanced Setup -> FHIR in the Open Dental program.
Joe Sullivan
Open Dental Software
http://www.opendental.com

mandmdiet
Posts: 113
Joined: Tue Aug 17, 2021 9:37 am

Re: Developer Portal Access

Post by mandmdiet » Fri Aug 27, 2021 12:10 pm

OK, I understand now I think, thank you joes.

ajaykodam
Posts: 32
Joined: Tue Aug 17, 2021 10:53 pm

Re: Developer Portal Access

Post by ajaykodam » Tue Aug 31, 2021 3:57 am

1. I have Developer Key received from the vendor.relations@opendental.com.
2. I have created multiple keys by login to Developer portal https://api.opendental.com/portal/gwt/fhirportal.html.
3. I have assigned those keys to a customer by going to Setup -> Advanced Setup -> FHIR in the Open Dental program.
4. I have already been running eConnectorService on the machine.
5. But when I am accessing the Open dental any API "https://api.opendental.com/api/v1/" with header "Authorization" includes value "ODFHIR DeveloperKey/CustomerKey" getting 400 bad request "The server has encountered an error."

Could you please help me on this?

SLeon
Posts: 476
Joined: Mon Mar 01, 2021 10:00 am

Re: Developer Portal Access

Post by SLeon » Tue Aug 31, 2021 1:08 pm

Your Authorization header appears to be formatted correctly. This type of error message generally points to an issue with the eConnector. What version is your eConnector on?

ajaykodam
Posts: 32
Joined: Tue Aug 17, 2021 10:53 pm

Re: Developer Portal Access

Post by ajaykodam » Tue Aug 31, 2021 10:55 pm

Open Dental Version 21.1.52.0

SLeon
Posts: 476
Joined: Mon Mar 01, 2021 10:00 am

Re: Developer Portal Access

Post by SLeon » Wed Sep 01, 2021 8:06 am

With your eConnector on that version, you should be able to use any API method that was released in 21.1, such as Patients GET. Which method are you using when you get this error?

ajaykodam
Posts: 32
Joined: Tue Aug 17, 2021 10:53 pm

Re: Developer Portal Access

Post by ajaykodam » Wed Sep 01, 2021 11:07 pm

I am using PUT method for this URL https://api.opendental.com/api/v1/queri ... ?Offset=99, I will check with Patient GET

ajaykodam
Posts: 32
Joined: Tue Aug 17, 2021 10:53 pm

Re: Developer Portal Access

Post by ajaykodam » Wed Sep 01, 2021 11:18 pm

I am able to get the data from PATIENT GET API, but "/queries/ShortQuery?Offset=99" this API isn't working PUT method and its gives me Bad Request.

SLeon
Posts: 476
Joined: Mon Mar 01, 2021 10:00 am

Re: Developer Portal Access

Post by SLeon » Thu Sep 02, 2021 8:27 am

The difference is that Patients GET was released in version 21.1 and Queries PUT ShortQuery is in version 21.2. Because your eConnector is on version 21.1, you cannot access the ShortQuery method until you update it to 21.2. Our documentation indicates which version each API method was released just above the method's description. If a version is not specified, it was released in 21.1. Here is a link to our updated documentation for easy reference. https://www.opendental.com/resources/OpenDentalAPI.pdf.

ajaykodam
Posts: 32
Joined: Tue Aug 17, 2021 10:53 pm

Re: Developer Portal Access

Post by ajaykodam » Thu Sep 02, 2021 10:12 am

Thank you so much, I have updated to version 21.2. Now I am getting the below error while calling the shortquery API.

"An SQL error occured: Authentication to host 'localhost' for user '' using method 'mysql_native_password' failed with message: Access denied for user ''@'localhost' to database"

SLeon
Posts: 476
Joined: Mon Mar 01, 2021 10:00 am

Re: Developer Portal Access

Post by SLeon » Thu Sep 02, 2021 10:35 am

The ShortQuery method will use the ''@localhost MySql user for your database. This ''@localhost user has no permissions granted by default, so you just need to grant that MySql user SELECT privileges to be able to run your query.

ajaykodam
Posts: 32
Joined: Tue Aug 17, 2021 10:53 pm

Re: Developer Portal Access

Post by ajaykodam » Thu Sep 02, 2021 9:12 pm

Thank you I will check that

ajaykodam
Posts: 32
Joined: Tue Aug 17, 2021 10:53 pm

Re: Developer Portal Access

Post by ajaykodam » Fri Sep 03, 2021 4:40 am

I already have all this Grant permission to mysql user but still getting the same error for shortquery api, Please help me on this?

GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` IDENTIFIED BY PASSWORD '' WITH GRANT OPTION
GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION

SLeon
Posts: 476
Joined: Mon Mar 01, 2021 10:00 am

Re: Developer Portal Access

Post by SLeon » Fri Sep 03, 2021 8:35 am

The grant needs to be for the ''@'localhost' user, not to the 'root'@'localhost' user. You also only need to set the SELECT permission to use the Queries PUT ShortQuery API method.

ajaykodam
Posts: 32
Joined: Tue Aug 17, 2021 10:53 pm

Re: Developer Portal Access

Post by ajaykodam » Fri Sep 03, 2021 8:53 am

It works thank you very much for all the help.

GRANT SELECT ON *.* TO ''@`localhost`

User avatar
jordansparks
Site Admin
Posts: 5739
Joined: Sun Jun 17, 2007 3:59 pm
Location: Salem, Oregon
Contact:

Re: Developer Portal Access

Post by jordansparks » Mon Sep 06, 2021 5:56 pm

Like I said in the other thread, I consider this a bug. No change to the MySQL user should be necessary.
Jordan Sparks, DMD
http://www.opendental.com

User avatar
jordansparks
Site Admin
Posts: 5739
Joined: Sun Jun 17, 2007 3:59 pm
Location: Salem, Oregon
Contact:

Re: Developer Portal Access

Post by jordansparks » Wed Sep 08, 2021 9:39 am

We have edited the documentation to clarify that you should not leave a blank <UserLow> tag in the config file, because you would then need to add MySQL permission for the blank user @localhost. Either specify an actual UserLow user, or remove the tag entirely.
Jordan Sparks, DMD
http://www.opendental.com

ajaykodam
Posts: 32
Joined: Tue Aug 17, 2021 10:53 pm

Re: Developer Portal Access

Post by ajaykodam » Wed Sep 22, 2021 6:52 am

Thank you

SLeon
Posts: 476
Joined: Mon Mar 01, 2021 10:00 am

Re: Developer Portal Access

Post by SLeon » Fri Dec 17, 2021 10:44 am

We no longer recommend removing the <UserLow> and <PasswordLow> tags in the OpenDentalWebConfig.xml file. The API Queries POST and Queries PUT can now be run without setting up special SQL users or modifying the config file. Please see our updated documentation for details: https://www.opendental.com/site/apiqueries.html.

Post Reply