How do I consume the REST API in Magento 2, using AJAX with session-based authentication?
I am having issues successfully making an AJAX call to Magento 2 REST API endpoints, using session-based authentication.
I am logged into the admin area as a user with all ACL privileges.
Here is the code that I am using to test the API:
From what I can tell, by reading the Magento 2 docs, session-based authentication for the admin area, should work.
Can someone please tell me if it’s possible to consume the API this way, and how to get it working correctly.