Page 1 of 1
API query error message
Posted: Mon Jun 26, 2023 7:50 am
by beacondental
Under API query, I am getting an error saying 'Unauthorized' if I run Dentist KPI (QR41564) query in my local machine. We tried but has not worked for us. See attached error message. Please help and let me know the issue.

- Error message
- image(2).png (23.62 KiB) Viewed 7354 times
Re: API query error message
Posted: Mon Jun 26, 2023 9:47 am
by SLeon
I would double check your syntax and variable naming. Did you try to run this query in the User Query window of Open Dental?
I was able to run this query with the Public Demo dental office credentials without issue.
Re: API query error message
Posted: Tue Jun 27, 2023 6:56 am
by beacondental
That query is working fine if I run it in User Query window of Open Dental, but if I try running it in PUT ShortQuery method API then it is giving unauthorized as error.
Re: API query error message
Posted: Tue Jun 27, 2023 9:48 am
by justine
beacondental wrote: ↑Tue Jun 27, 2023 6:56 am
That query is working fine if I run it in User Query window of Open Dental, but if I try running it in PUT ShortQuery method API then it is giving unauthorized as error.
Good morning beacondental,
Depending on how you are sending your API request, the application/program/client may have trouble parsing double quotes contained within the query itself.
Try replacing any (") with (') in your query.
Re: API query error message
Posted: Tue Jun 27, 2023 9:29 pm
by beacondental
justine wrote: ↑Tue Jun 27, 2023 9:48 am
beacondental wrote: ↑Tue Jun 27, 2023 6:56 am
That query is working fine if I run it in User Query window of Open Dental, but if I try running it in PUT ShortQuery method API then it is giving unauthorized as error.
Good morning beacondental,
Depending on how you are sending your API request, the application/program/client may have trouble parsing double quotes contained within the query itself.
Try replacing any (") with (') in your query.
Dear Team,
Thank you for your support, I replaced (") with (') and it is working fine now