registration is done via postman as in the picture.
authentication is done via swagger as seen in the screenshot.
Get api/patient did not work as seen in the screenshot because the server denied! But the authentication step worked just fine!
Look at the scope parameter in your registration request. Your client is not requesting any access to the user/patient.read scope, I’ve moved your post to a different issue as your not getting invalid client but a 401 access denied response. If you turn on under Config in Logging the System Error Logging Options to Debug mode and you’ll get more details in your php error log of what you are doing wrong.
Dear Saeed,
TL/DR; Upgrade to Patch 3 over 7.0.2 and retry.
To describe more, I have found an issue on version 7.0.2 which might have affected you depending on the method you have used to install openemr.
Actually, there ought to exist a _rest_config.php file in the root of openemr folder as referenced by the line 22 of register-app.php (as of version 7.0.2, and line 34 in the patch 3 as shown in the picture).
I confirm that the above file does not exist in release 7.0.2 (windows zip file). But it will be added if you apply patch3 (elaborated in the photo again). I have not yet investigated the packages for other platforms (e.g. the tar.gz version for linux, etc) for the same flaw.
Kindly please verify whether your “openemr/interface/smart/register-app.php” references the “/openemr/_rest_config.php” using “require_once(“./…/…/_rest_config.php”);” syntax on the first few lines (probably 20 to 40) of the former mentioned file. Then kindly please verify existence of the latter mentioned file.