/scripts/ahub.form.attachments.js
0

Getting 403 forbidden error while posting output for SAP BPM task

Jan 31, 2017 at 08:09 AM

49

avatar image
Former Member

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.

forbidden-error.png (265.9 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

VIPLOVE KHUSHALANI Jan 31, 2017 at 08:29 AM
0

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

thanks

Viplove

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

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.

0
Skip to Content