Do you use or administer OpenEMR? Take the General Satisfaction Survey to help improve the product

Getting internal server error, auth rest API

Hi there,

I have created a user from the admin and trying to login using the same credentials, getting 500 error while calling /apis/api/auth end point.
“username”: “xxxxx”,
“password”: “test123”,

OpenEMR Version
I’m using OpenEMR version

I’m using: client application (e.g. postman)

Operating System
I’m using: osX

Best regards,

Hi @rhlcliffex

Have you referred this.


thanks for your response. Could you please help me to get the site id ?

Best regards,

If you’re not using multisite the


Otherwise use your multisite site name

Thanks Jerry… it works

Hi guys,

I just looked at this thread and I kinda have the same issue.

I’m directly logged on my ubuntu machine where OpenEMR is installed and I run a very basic auth command:

curl -X POST -v --insecure -H ‘Content-Type: application/json’ ‘http://localhost/apis/api/auth
-d ‘{
“username”: “me”,
“password”: “mypassword”,

and this is what I get back

Note: Unnecessary use of -X or --request, POST is already inferred.

  • Trying…
  • Connected to localhost ( port 80 (#0)

POST /apis/api/auth HTTP/1.1
Host: localhost
User-Agent: curl/7.47.0
Accept: /
Content-Type: application/json
Content-Length: 142

  • upload completely sent off: 142 out of 142 bytes
    < HTTP/1.1 400 Bad Request
    < Date: Thu, 04 Feb 2021 05:46:36 GMT
    < Server: Apache
    < Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
    < X-XSS-Protection: 1; mode=block
    < Content-Length: 0
    < Connection: close
    < Content-Type: text/html; charset=UTF-8
  • Closing connection 0

I verified my credentials using the main OpenEMR web interface and it works sop I’m wondering what I’m doing wrong …

Any help is greatly appreciated :slight_smile: