cancel
Showing results for 
Search instead for 
Did you mean: 

Getting 403 forbidden error while posting output for SAP BPM task

Former Member
0 Kudos

HI Experts,

I am trying to intergrate SAP BPM with SAP UI5, while trying to post the output in the bpm task, i am getting error "403 forbidden". I have checked and found that the xcsrf token is coming as "required", which is the cause of this issue.

Code to post the data in the bpm task-

odataModel.create("/OutputData", outputData, null, function() {})

I found that create method triggers two calls.

1. GET- to fetch the xcsrf-token

Here the GET api is getting failed with 500 Internal Server Error but in the response header i can see the xcsrf-token generated and returned.

2. POST- to complete the task

Here in the request header i can see the xcsrf- token value is set as "required".

Is this is the correct value for xcsrf-token or it should be set to the value returned from the GET call.

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member340030
Contributor
0 Kudos

For posting you need to set the same XCSRF token what you received from GET.

thanks

Viplove

Former Member
0 Kudos

odataModel.create("/OutputData", outputData, null, function() {}) internally triggers the get and post call.

I am not externally setting the XCSRF token.

The above code to create the "outputdata" is generated when i map UI component to BPM task. So this get and post calls are not explicitly called by me.