How can I access the API using javascript?

How can I access the API using javascript?

I want to access the ManageEngine Service Desk Plus API using javascript.

Although I added the "Allow Access-Control-Allow-Origin" security response headers and restart the application server, I still got the CORS error.

I attached all related file for your reference.
                New to ADManager Plus?

                  New to ADSelfService Plus?