API query error message

For requests or help with our API
Post Reply
beacondental
Posts: 113
Joined: Wed Mar 15, 2023 8:43 am

API query error message

Post by beacondental » Mon Jun 26, 2023 7:50 am

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
Error message
image(2).png (23.62 KiB) Viewed 4779 times

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

Re: API query error message

Post by SLeon » Mon Jun 26, 2023 9:47 am

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.

beacondental
Posts: 113
Joined: Wed Mar 15, 2023 8:43 am

Re: API query error message

Post by beacondental » 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.

justine
Posts: 233
Joined: Tue Dec 28, 2021 7:59 am

Re: API query error message

Post by justine » 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.

beacondental
Posts: 113
Joined: Wed Mar 15, 2023 8:43 am

Re: API query error message

Post by beacondental » Tue Jun 27, 2023 9:29 pm

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

Post Reply