OpenEMR 7.0.3 OAuth2 JWT – Getting 400 invalid_client Even After Proper Setup

Thanks a lot Jerry for making time for us even on your holiday… :slightly_smiling_face:
We will handle it from here… :+1:
Hope you enjoy your holiday …:grin:

Hi Jerry,

Thank you so much for your continued guidance , with your help, we’re now able to navigate through the OpenEMR API Explorer smoothly. As you know, it offers three types of client options: Confidential, Public, and JWT.

We’re happy to share that the JWT client is working perfectly. We’re successfully obtaining the access token and using it to create patient IDs — all thanks to your support!

However, we’ve hit a snag with the Confidential and Public client types. When attempting the same steps, we’re still encountering the same old 500 error. We’re wondering if this is something to be concerned about, or just expected behavior for now?

We’re attaching a screen recording for your reference (where we are using JWT client for the token).



Register Clients :point_up_2:

Patient JSON Output in the OpenEMR Explorer itself after Fetch :point_up_2: (same output we are getting in the Postman)

Thanks again for all your help! :grin:

We also like to discuss further steps and ideas that we had in mind from the start and want to implement them perfectly in the OpenEMR platform. :slightly_smiling_face:

I don’t know what’s wrong on your environment. I’ve tested

  • All grant types on 3 dev demos, easy dev docker, localhost and my web site.
    All works okay for me and is seamless across all grants so you’ll need to just grind it out guys.

Ok Jerry thanks for your confirmation. In cloud, JWT is working perfect except for the other 2.Just like yours, our localhost, all 3 are working perfect and as per some go through, we are kind of informed that it might be not a point of concern on basis of Google Cloud Deployment. All over, we have been successful in OpenEMRv7.0.3 (google cloud deployed) api integration with your guidance and help. We hope to keep this professional forum connection for our future help in the new modifications we have planned to do in OpenEMR from the start. :slightly_smiling_face: :+1:

Okay guys thanks. Its been fun.
The biggest thing I got out of this is the fact I’ve been trying to dev a demo app to help others succeed with our API’s. The Explorer will help in that effort.
I’ll publish and advertise on forum and API docs how to get app.
Hopefully folks will help improve and contribute back to the community.

Good luck.

1 Like

Use this tool in Config Logging to help troubleshoot your issues. The log appears in php error log and is very detailed. Turn on in openemr and log will still work in Explorer.

1 Like

Hi Jerry,

Hope you’re doing well!

We’re planning to post about the work we did together on LinkedIn to share the experience and showcase the results. I wanted to check with you first, would it be okay if we mention you in the post?

Please let me know if you’re comfortable with it or if you’d prefer not to be tagged.

Thanks a lot!