Authorization REST API gives 401

Hi all,

I cannot get the authorization API to work. I have installed 5.0.2 on windows and using XAMPP as the webserver. I am calling the APIs on postman and also using CURL.
Document referred: openemr/API_README.md at master · openemr/openemr · GitHub

The authorization registration API when called gives 401 and an empty body.
http://localhost:80/openemr/apis/oauth2/default/registration

How do I get this working?

Thanks,
Annapoorna

Hi @Annapoorna,

What error your getting while your doing postman?

oauth2/oidc is not supported in v5.0.2!

Hi @sjpadgett,

Thanks for the reply. Could you also tell what version of openEMR supports oauth2?

I get 401 unauthorized error and an empty response body.

v6.0.0 but not released yet. maybe next couple weeks or sooner.

1 Like

Hi all,

Thanks for the replies.

I am able to successfully run the authorization API and get the auth token by using the following API on v.5.0.2 by passing username and password.
http://localhost:80/openemr/apis/api/auth