I need to test this feature quite a bit and here’s the command I use:
(using name/pass HEU-admin-32 and then generally the scope is always default unless you are using multisite feature). I also need to use --insecure tag since I’m using self-signed certs on the openemr server I’m using.
hi @stephenwaite ,
Note that testing script is for using the api internally (when already logged into OpenEMR). More for developers to make sure we didn’t break anything on api internal use when we do dev work on the api.
-brady
Lose the single quotes in body json array. content type is jason so string is implied…
here:
{
“grant_type”:“password”,
“username”: “ServiceUser”,
“password”: “password”,
“scope”:“site id”
}
I installed a brand new open-emr site with https enabled. Maybe that was the problem…(Setting Enable OpenEMR REST API - popup says SSL required.) https://openemr.XXXX.com/apis/api/auth
But still nog luck. html-code 404
404 Not Found
Not Found
The requested URL was not found on this server.
Apache/2.4.29 (Ubuntu) Server at openecd.xxxxx.com Port 443
thank you @brady.miller, saw below part of @vandijk’s post and thought that maybe could start with that, if not working then thinking there’s something in the error logs
Thanks for your reply and patients.
It looks like something is missing, installed Open-emr on another ubuntu server from scratch, no difference, nothing in error log.
Questions:
should it work out of the box (without adding code or extensions ?)
there is a recommendation during install how to configure the directive of the apache conf. (Denied access to /sites/ etc) should this be altered for using the api?
is everybody in this thread, working with the docker build?
hi @stephenwaite ,
Nice call on using the demo (note the demo won’t even need the --insecure tag since it is using a genuine ssl cert) for testing. @vandijk , did Stephen’s above command work for you? (this will ensure that your curl client is working)
-brady
Thank you for your response, in the screenshot above, I’m showing that curl is not working for the api. It also shows curl is working for the open-emr-site itself.