avatar image
Former Member

Getting 403 forbidden error while posting output for SAP BPM task

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)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Jan 31, 2017 at 08:29 AM

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



    Add comment
    10|10000 characters needed 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.

Skip to Content