Skip to Content

403 Forbidden when POSTING from c# application

I'm writing an application which calls a SAP Gateway service. but I'm facing some problems related with my post requisition. I'll describe the steps I'm following.

First, I'm making a get requisition with username and password to take the token by x-csrf-token. Then I try to make a post requisition passing this token, but the problem is that I have been receiving the 403 Forbidden error.

I don't know why, but using the postman app to make the post requisition, both steps cited above works fine.

Another thing is that my application takes a different token for each get requisition, this is a thing that doesn't happen using postman.

To finish, I found a post of a colleague in the scn with the same problem I'm facing, but i didn't feel satisfied with the answer.

https://archive.sap.com/discussions/thread/3956649

If someone could help me, i'll be very glad.

thank you.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • May 12, 2017 at 03:24 PM

    The problem was solved by adding the header "cookie = SAP_SESSIONID_GWD_100=foNn4m5...." which is returned in the get requisition.

    Add comment
    10|10000 characters needed characters exceeded