Customer API key return data issue

For requests or help with our API
Post Reply
ajaykodam
Posts: 32
Joined: Tue Aug 17, 2021 10:53 pm

Customer API key return data issue

Post by ajaykodam » Wed Apr 06, 2022 4:28 am

Hi

- We have one registration key which we are using 3 different machines were Open Dental Software installed.
- We have created a Customer API key for those 3 different machines and added to respective machine.
- We have different data on each machine.
- When we are calling the Patient/Claim, etc. API with any Customer API Key then data, returning from only one machine.

Thanks,

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

Re: Customer API key return data issue

Post by SLeon » Wed Apr 06, 2022 8:41 am

The API utilizes the dental office's eConnector to validate developer API, customer API, and registration keys with Open Dental.

Do you have an eConnector installed and running on each machine? At the time of eConnector installation, you choose which database to pair it with. An eConnector is specifically tied to one registration key. More information on the eConnector can be found here https://www.opendental.com/manual/econnector.html.

Most dental offices have one registration key and database, so use only one eConnector and customer API key.

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

Re: Customer API key return data issue

Post by ajaykodam » Wed Apr 06, 2022 10:06 pm

Thank you SLeon, I will check on that.

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

Re: Customer API key return data issue

Post by mandmdiet » Thu Apr 07, 2022 10:49 am

SLeon wrote:
Wed Apr 06, 2022 8:41 am
The API utilizes the dental office's eConnector to validate developer API, customer API, and registration keys with Open Dental.

Do you have an eConnector installed and running on each machine? At the time of eConnector installation, you choose which database to pair it with. An eConnector is specifically tied to one registration key. More information on the eConnector can be found here https://www.opendental.com/manual/econnector.html.

Most dental offices have one registration key and database, so use only one eConnector and customer API key.
Thanks for your response SLeon, this makes me realize that we were mistaken about how the connection between Open Dental and the eConnector works. I thought that any messages sent to the Open Dental API would be routed to the correct Open Dental eConnector based on the Developer API Key + Customer Key but that's not exactly correct, right? Or at least not completely correct.

A few things we have observed:
We have 3 different environments (Dev, QA and UAT) and we have an instance of Open Dental installed on a machine in each environment. We also have an instance of our application in each environment which has been written to pair requests to the Open Dental API with a customer API key depending on the instance we want to communicate with. In each environment we've paired our application requests with a different customer API key. We've also gone into Open Dental in each environment to set up those customer API keys.

A couple things I saw that concerned me were:
1. All of the customer API keys were visible in each Open Dental instance (I thought each Open Dental instance would only be aware of the customer API keys we configured it to use). This is concerning to me because different clients would see all customer API keys, even those for other clients and the wrong customer key could inadvertently be activated on different clients.
2. When we activate or deactivate a key using the eConnector interface in Open Dental for any instance, it activates or deactivates that key for all instances.

So, at this point, I'm assuming we're just misusing these keys and I understand you're saying that somehow the key is tied to an activation code? Does that mean that if I have activation code 12345 on all instances of Open Dental in each environment that whenever I configure a customer API key in one, they all communicate with each other to keep them all in sync on the customer API keys?

If that's the only missing link in our configuration, where can we go to get a different activation code for each instance of Open Dental in our different environments?

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

Re: Customer API key return data issue

Post by SLeon » Thu Apr 07, 2022 11:24 am

I understand that you have three different environments, machines, and databases, but it sounds like you are only using one registration key, correct? A registration key and eConnector share a one to one relationship. To use three different databases, each would need it's own registration key, eConnector, and customer API key.

The setup window in Open Dental that displays API key information is populated via webcall. It sends the registration key of that office to see what API keys are associated with it. A customer may see more than one customer key here if they are using more than one third party software (more than one developer/customer key pair). The developer key is not stored here, and other developers are not able to access your key. The fact that you are seeing all your keys in each Open Dental instances indicates that you are trying to use the same registration key for all three environments.

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

Re: Customer API key return data issue

Post by mandmdiet » Thu Apr 07, 2022 4:34 pm

SLeon wrote:
Thu Apr 07, 2022 11:24 am
I understand that you have three different environments, machines, and databases, but it sounds like you are only using one registration key, correct? A registration key and eConnector share a one to one relationship. To use three different databases, each would need it's own registration key, eConnector, and customer API key.

The setup window in Open Dental that displays API key information is populated via webcall. It sends the registration key of that office to see what API keys are associated with it. A customer may see more than one customer key here if they are using more than one third party software (more than one developer/customer key pair). The developer key is not stored here, and other developers are not able to access your key. The fact that you are seeing all your keys in each Open Dental instances indicates that you are trying to use the same registration key for all three environments.
OK thank you SLeon, that helps make this more clear to us on how it works. Where can we request a registration key for each test instance of Open Dental we are using? Can we get that through the forums?

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

Re: Customer API key return data issue

Post by SLeon » Fri Apr 08, 2022 11:25 am

You can send an email to vendor.relations at opendental.com, and they can get you set up.

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

Re: Customer API key return data issue

Post by mandmdiet » Mon Apr 11, 2022 8:59 am

SLeon wrote:
Fri Apr 08, 2022 11:25 am
You can send an email to vendor.relations at opendental.com, and they can get you set up.
Thanks SLeon we were talking today about a possibility of this happening in production and wanted to get your take on it. If two separate offices somehow have the same installation key and we try to connect one of them using the Open Dental API we may actually start communicating with the wrong practice and we'd be getting records from the wrong location and if it's not caught we may also start changing records for the wrong practice. Is there a way for us to check the configuration of an Open Dental instance so that we can catch this before it happens?

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

Re: Customer API key return data issue

Post by SLeon » Mon Apr 11, 2022 9:35 am

I understand your concern. Multiple offices using a single registration key should never happen in production. Each Open Dental customer must use a unique registration key and should not be shared with other customers. Many issues will arise if one dental office is trying to use another office's the registration key, including anything that uses the eConnector. Any subsequently installed eConnectors attempting to connect with the same registration key will fail, as you observed with your environments.

If you are still wanting to "check the configuration" of a customer, you could check some of the practice specific fields in the preference table (such as "PracticeTitle") to verify. But again, this should not be necessary.

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

Re: Customer API key return data issue

Post by mandmdiet » Mon Apr 11, 2022 3:58 pm

SLeon wrote:
Mon Apr 11, 2022 9:35 am
I understand your concern. Multiple offices using a single registration key should never happen in production. Each Open Dental customer must use a unique registration key and should not be shared with other customers. Many issues will arise if one dental office is trying to use another office's the registration key, including anything that uses the eConnector. Any subsequently installed eConnectors attempting to connect with the same registration key will fail, as you observed with your environments.

If you are still wanting to "check the configuration" of a customer, you could check some of the practice specific fields in the preference table (such as "PracticeTitle") to verify. But again, this should not be necessary.
My only concern is the way we saw it fail. If it failed to work at all or showed an error message or something that would be fine, but in the case we saw in our different environments it failed silently and routed all API requests to one of the instances with the same key.

You said we could check something in the configuration to make sure we weren't going to experience that issue with one of our customers? How would we check that?

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

Re: Customer API key return data issue

Post by SLeon » Tue Apr 12, 2022 9:01 am

Subsequently installed eConnectors fail silently and preserve the connection of the original, valid eConnector. This is helpful in many cases, for example, if another workstation at the dental office accidentally tries to install a second eConnector. This erroneous eConnector does not disrupt the established, original eConnector.

As I mentioned, if you wanted to further validate an office, you could use the API to check some of the known practice preferences (either with Preferences GET or Queries PUT ShortQuery). This may include things like the address or the name of the practice.
Last edited by SLeon on Tue Apr 12, 2022 6:50 pm, edited 1 time in total.

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

Re: Customer API key return data issue

Post by mandmdiet » Tue Apr 12, 2022 3:47 pm

SLeon wrote:
Tue Apr 12, 2022 9:01 am
Subsequently installed eConnectors fail silently and preserve the connection of the original, valid eConnector. This is helpful in many cases, for example, if another workstation at the dental office accidentally tries to install a second eConnector. This erroneous eConnector does not disrupt the established, original eConnector.

As I mentioned, if you wanted to be further validate an office, you could use the API to check some of the known practice preferences (either with Preferences GET or Queries PUT ShortQuery). This may include things like the address or the name of the practice.
Ah, I see what you're saying now. OK, thanks SLeon.

Post Reply