Unable to Perform http post request

Hi Community

I am trying to perform http post request using a bonita Application page. I am using custom Angular code , Not through any widget.
I am getting error 401. .Please help

$http.post('/bonita/API/bpm/process/6515950097857156604/instantiation', JSON.stringify(data)).then(function (response) {

I was able to get the Bonita X API token but i am not sure how to pass this along with POST request.

Could somebody provide a example.

Hi Roy,

Did you try to add them in your request header ?
I recommend removing the/bonita prefix of your URL and use ../API instead, the server will handle the redirection.

You can find an example of how to use the $http service in the existing Button controller.

HTH
Romain

Try to send localhost prefix with the URL You used