'Acumatica - How to call rest api from web ui?

I have embedded javascript in the acumatica webfrontend and would like to make an ajax request to acumatica's contract-based rest api.

The call uses the same cookie as the webfrontend but gets the error 401. Is there a way to achieve this?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source