Currently I am trying to call the Leonardo Language Detection API Sandbox within the Web Ide as an xhr Request.
The Response im getting from the API is an 403 Error.
My API call (data is an JSON stringified Object with the right format):
xhr.open("POST", "https://sandbox.api.sap.com/ml/languagedetection/language", false);
xhr.setRequestHeader("Content-Type", "application/json");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("APIKey", "****");
xhr.send(data);
I also called several other Leonardo API's this way and it works fine. The same Request also works fine when sending with Postman App. It's just not working in my application and I can't figure out why.