Rest api intergration in a web application

Hi guys,
I am designing a web-based application that consumes the Rest API. I would like to know how to achieve this. I have tried to connect to the API using a jquery ajax request but this returns an error related to the fact that it is a cross-domain request. To solve this, I made a core request it also failed. I would like to know if somebody in this forum has been able to consume data from the Lora-app-server trough the rest API?
Please help.

Read about JWT and then have a look at the lora-app-server documentation: